Commit 03f6d685 authored by TanakaKotoha's avatar TanakaKotoha

lua and cdb fix

parent b84e2358
No preview for this file type
...@@ -77,5 +77,5 @@ function c14801962.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -77,5 +77,5 @@ function c14801962.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(sg,REASON_COST+REASON_FUSION+REASON_MATERIAL) Duel.Release(sg,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end end
function c14801962.antarget(e,c,sump,sumtype,sumpos,targetp) function c14801962.antarget(e,c,sump,sumtype,sumpos,targetp)
return c:IsAttackBelow(3000) return c:IsAttackAbove(3000)
end end
\ No newline at end of file
...@@ -123,13 +123,13 @@ end ...@@ -123,13 +123,13 @@ end
function c21520180.fstg(e,tp,eg,ep,ev,re,r,rp,chk) function c21520180.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetMatchingGroup(c21520180.fmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(c21520180.fmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,e)
return Duel.GetLocationCountFromEx(tp)>0 return Duel.GetLocationCountFromEx(tp,tp,mg)>0
and Duel.IsExistingMatchingCard(c21520180.fsfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) end and Duel.IsExistingMatchingCard(c21520180.fsfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c21520180.fsop(e,tp,eg,ep,ev,re,r,rp) function c21520180.fsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
local mg=Duel.GetMatchingGroup(c21520180.fmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,e) local mg=Duel.GetMatchingGroup(c21520180.fmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,e)
if Duel.GetLocationCountFromEx(tp,tp,mg)<=0 then return end
local sg=Duel.GetMatchingGroup(c21520180.fsfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg) local sg=Duel.GetMatchingGroup(c21520180.fsfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -147,7 +147,7 @@ function c21520180.fsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -147,7 +147,7 @@ function c21520180.fsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(mat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.Remove(mat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
local tc=Duel.GetFirstMatchingCard(c21520180.procfilter,tp,LOCATION_EXTRA,0,nil,code,e,tp) local tc=Duel.GetFirstMatchingCard(c21520180.procfilter,tp,LOCATION_EXTRA,0,nil,code,e,tp)
if not tc then return end if not tc then return end
if Duel.GetLocationCountFromEx(tp)<=0 then if Duel.GetLocationCountFromEx(tp,tp,mg)<=0 then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
tc:CompleteProcedure() tc:CompleteProcedure()
else else
......
...@@ -121,12 +121,12 @@ function cm.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -121,12 +121,12 @@ function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.lvfilter,tp,LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(cm.lvfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst() local tc=sg:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8) e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) tc:RegisterEffect(e1)
tc=sg:GetNext() tc=sg:GetNext()
end end
end end
......
--深界遗物 探窟者的白笛 --深界遗物 探窟者的白笛
local m=33330034 local m=33330034
local cm=_G["c"..m] local cm=_G["c"..m]
cm.counter=0x1019 --指 示 物 cm.counter=0x1556 --指 示 物
cm.atk=500 --攻 击 力 cm.atk=500 --攻 击 力
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
......
...@@ -28,6 +28,13 @@ function c81008023.initial_effect(c) ...@@ -28,6 +28,13 @@ function c81008023.initial_effect(c)
e2:SetTarget(c81008023.target) e2:SetTarget(c81008023.target)
e2:SetOperation(c81008023.operation) e2:SetOperation(c81008023.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCondition(c81008023.efcon)
e4:SetOperation(c81008023.efop)
c:RegisterEffect(e4)
end end
function c81008023.lcheck(g,lc) function c81008023.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_XYZ) return g:IsExists(Card.IsLinkType,1,nil,TYPE_XYZ)
...@@ -53,3 +60,23 @@ function c81008023.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,3 +60,23 @@ function c81008023.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,Group.FromCards(tc)) Duel.Overlay(c,Group.FromCards(tc))
end end
end end
function c81008023.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c81008023.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c81008023.sumcon)
e1:SetOperation(c81008023.sumsuc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c81008023.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c81008023.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81009011,1))
end
...@@ -37,6 +37,13 @@ function c81009015.initial_effect(c) ...@@ -37,6 +37,13 @@ function c81009015.initial_effect(c)
e3:SetTarget(c81009015.mttg) e3:SetTarget(c81009015.mttg)
e3:SetOperation(c81009015.mtop) e3:SetOperation(c81009015.mtop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCondition(c81009015.efcon)
e4:SetOperation(c81009015.efop)
c:RegisterEffect(e4)
end end
function c81009015.lcheck(g,lc) function c81009015.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_XYZ) return g:IsExists(Card.IsLinkType,1,nil,TYPE_XYZ)
...@@ -77,3 +84,23 @@ function c81009015.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,3 +84,23 @@ function c81009015.mtop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,g) Duel.Overlay(c,g)
end end
end end
function c81009015.efcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function c81009015.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c81009015.sumcon)
e1:SetOperation(c81009015.sumsuc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c81009015.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c81009015.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81009011,1))
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