Commit 51accc95 authored by Nemo Ma's avatar Nemo Ma

upd wd

parent 72826f7f
......@@ -110,8 +110,10 @@
11662004 0
12678871 0
13131365 0
14000129 0
14000703 0
14000704 0
14000706 0
14000781 0
14000782 0
14000783 0
......@@ -412,6 +414,7 @@
49678550 0
50005205 0
50587164 0
53587967 0
53752002 0
53752007 0
53752008 0
......@@ -469,6 +472,7 @@
61777317 0
63288533 0
63813050 0
65130400 0
67200701 0
67200702 0
67200703 0
......@@ -1026,6 +1030,7 @@
98920114 0
98920183 0
98920188 0
98920198 0
98920245 0
98920313 0
98920339 0
......@@ -1043,6 +1048,8 @@
98940010 0
98940011 0
98940012 0
98940013 0
98940019 0
99550610 0
99700125 0
99700135 0
......@@ -1206,6 +1213,7 @@
130006024 0
151194046 0
192746535 0
#Semi-Wild 1003
31409200 0
31409201 0
......
No preview for this file type
--节点圆环之理
local m=14000129
local cm=_G["c"..m]
cm.named_with_Circlia=1
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--link
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE+LOCATION_HAND+LOCATION_DECK)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_FZONE+LOCATION_HAND+LOCATION_DECK)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
end
function cm.CIR(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Circlia
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return not re:GetHandler():IsCode(m)
end
function cm.filter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSpecialSummonable(SUMMON_TYPE_LINK)
end
function cm.spfilter(c,e,tp)
return cm.CIR(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local b1=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
return b1 or b2
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
Duel.SetChainLimit(cm.chlimit)
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
local op,bool=0,false
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonRule(tp,tc,SUMMON_TYPE_LINK)
end
else
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.efilter(e,te)
return te:IsActivated() and te:GetOwnerPlayer()~=e:GetOwnerPlayer()
end
\ No newline at end of file
--无形王者代偿
local m=14000706
local cm=_G["c"..m]
function cm.initial_effect(c)
--c:EnableReviveLimit()
--limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_INITIAL)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(0xff)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.con(e,c)
return not e:GetHandler():IsPublic()
end
function cm.sumfilter(c)
return c:IsSummonableCard() and not c:IsHasEffect(EFFECT_LIMIT_SUMMON_PROC)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmCards(1-tp,c)
if not c:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(tp,e:GetHandler())
end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,1))
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,1))
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.GetFirstMatchingCard(cm.sumfilter,tp,0xff,0xff,nil,tp)
if tc then
local zone=1<<0
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true,zone)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
--cannot summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_SUMMON)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetTargetRange(1,1)
Duel.RegisterEffect(e0,0)
Duel.Summon(tp,tc,true,nil,99)
e0:Reset()
end
end
\ No newline at end of file
This diff is collapsed.
--限制呼唤
function c65130400.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c65130400.tg)
e1:SetOperation(c65130400.op)
c:RegisterEffect(e1)
end
Llist = {}
function c65130400.Llistr(f,limit)
if f then
local fp=f:read("*line")
while fp do
while true do
if string.sub(fp,1,1)== '#' then
break
end
if string.sub(fp,1,1)== '!' then
Debug.Message("卡表:"..fp)
fp=f:read("*line")
while string.sub(fp,1,1)~= '!' do
local code=0
if string.sub(fp,1,1)~= '#' then
code=0
for word in string.gmatch(fp,"%d+") do
code=code+tonumber(word)
if tonumber(word)==limit then
table.insert(Llist, code-limit)
--Debug.Message(code)
--Duel.Hint(HINT_CARD,0,code)
end
end
end
fp=f:read("*line")
end
return
end
break
end
fp=f:read("*line")
end
f:close()
end
end
function c65130400.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local limit=Duel.SelectOption(tp,aux.Stringid(65130400,0),aux.Stringid(65130400,1),aux.Stringid(65130400,2))
e:SetLabel(limit)
end
function c65130400.op(e,tp,eg,ep,ev,re,r,rp)
c65130400.Llistr(io.open("lflist.conf","r"),e:GetLabel())
c65130400.Llistr(io.open("expansions/lflist.conf","r"),e:GetLabel())
local k =math.random(#Llist)
local tcode=Llist[k]
local pc=Duel.CreateToken(tp,tcode)
Duel.SendtoHand(pc,nil,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,tcode)
Llist = {}
end
......@@ -31,15 +31,21 @@ function cm.initial_effect(c)
e6:SetOperation(cm.chainop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW+CATEGORY_TODECK)
e7:SetDescription(aux.Stringid(m,0))
e7:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e7:SetTarget(cm.destg)
e7:SetOperation(cm.desop)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetDescription(aux.Stringid(m,1))
e8:SetTarget(cm.destg2)
e8:SetOperation(cm.desop2)
c:RegisterEffect(e8)
end
function cm.ffilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_PSYCHO) and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
......@@ -70,47 +76,37 @@ end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimit(cm.chainlm)
end
function cm.gyfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsAbleToDeck()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.gyfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local gc=g:GetCount()
if chk==0 then return gc>0 and g:FilterCount(Card.IsAbleToRemove,nil)==gc and Duel.IsPlayerCanDraw(tp,gc) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,gc,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,gc)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local n1=Duel.GetMatchingGroupCount(cm.gyfilter,tp,LOCATION_REMOVED,0,nil)
local n2=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
local n3=1
for i=2,99 do
if Duel.IsPlayerCanDraw(tp,i) then n3=i end
end
local n4=Duel.GetMatchingGroupCount(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local n5=1
for i=2,99 do
if Duel.IsPlayerCanDraw(1-tp,i) then n5=i end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local gc=g:GetCount()
if gc>0 and g:FilterCount(Card.IsAbleToRemove,nil)==gc then
local oc=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if oc>0 then
Duel.Draw(tp,oc,REASON_EFFECT)
end
end
local dc=math.min(n1,n2,n3+1,n4,n5-1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local gy=Duel.SelectMatchingCard(tp,cm.gyfilter,tp,LOCATION_REMOVED,0,1,dc,nil)
if #gy==0 then return end
Duel.HintSelection(gy)
local yc=Duel.SendtoDeck(gy,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if yc<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,yc,yc,nil)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,yc)
g:Merge(g1)
if #g>0 then
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,yc+1,REASON_EFFECT)
Duel.Draw(1-tp,yc-1,REASON_EFFECT)
end
function cm.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local gc=g:GetCount()
if chk==0 then return gc>0 and g:FilterCount(Card.IsAbleToRemove,nil)==gc and Duel.IsPlayerCanDraw(1-tp,gc) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,gc,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,gc)
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local gc=g:GetCount()
if gc>0 and g:FilterCount(Card.IsAbleToRemove,nil)==gc then
local oc=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if oc>0 then
Duel.Draw(1-tp,oc,REASON_EFFECT)
end
end
end
......@@ -10,19 +10,12 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_REMOVE)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
......@@ -60,16 +53,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -22,19 +22,12 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_REMOVE)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_REMOVED)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetCountLimit(1,m)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
......@@ -90,16 +83,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() or c:IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--水精鳞-深渊忒亚
function c98920198.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x74),1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920198,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,98920198)
e1:SetCost(c98920198.cost)
e1:SetTarget(c98920198.target)
e1:SetOperation(c98920198.operation)
c:RegisterEffect(e1)
--change target
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920198,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c98920198.tgcon1)
e1:SetOperation(c98920198.tgop1)
e1:SetTarget(c98920198.xyztg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920198,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c98920198.tgcon2)
e2:SetTarget(c98920198.xyztg)
e2:SetOperation(c98920198.tgop2)
c:RegisterEffect(e2)
end
function c98920198.xyzfilter(c,e,tp,mc)
return c:IsSetCard(0x74) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c98920198.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c98920198.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c98920198.costfilter(c,e,tp)
local lv=c:GetOriginalLevel()
return lv>0 and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c98920198.filter,tp,LOCATION_DECK,0,1,nil,e,tp,lv)
end
function c98920198.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c98920198.filter(c,e,tp,lv)
return c:IsSetCard(0x74) and not c:IsLevel(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920198.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c98920198.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c98920198.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetOriginalLevel())
Duel.SendtoGrave(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98920198.operation(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920198.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,lv)
local tc=g:GetFirst()
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
function c98920198.tgcon1(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end
local tc=g:GetFirst()
local c=e:GetHandler()
if tc:IsControler(1-tp) or tc:IsFacedown() or not tc:IsLocation(LOCATION_MZONE) or not tc:IsSetCard(0x74) then return false end
return Duel.CheckChainTarget(ev,c)
end
function c98920198.tgop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920198.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
if Duel.CheckChainTarget(ev,sc) then
local kg=Group.CreateGroup()
kg:AddCard(sc)
Duel.ChangeTargetCard(ev,kg)
end
end
end
end
function c98920198.tgcon2(e,tp,eg,ep,ev,re,r,rp)
if tp==Duel.GetTurnPlayer() or e:GetHandler():IsStatus(STATUS_CHAINING) then return false end
local tc=Duel.GetAttackTarget()
return tc and tc:IsFaceup() and tc:IsSetCard(0x74)
end
function c98920198.tgop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c98920198.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
if not Duel.GetAttacker():IsImmuneToEffect(e) then
Duel.ChangeAttackTarget(sc)
end
end
end
end
\ No newline at end of file
--神·史莱姆 Ⅱ
function c98940013.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_AQUA),c98940013.ffilter,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c98940013.splimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c98940013.hspcon)
e2:SetOperation(c98940013.hspop)
c:RegisterEffect(e2)
--triple tribute(require 3 tributes, summon)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(98940013)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98940013,0))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetCondition(c98940013.ttcon)
e3:SetTarget(c98940013.tttg1)
e3:SetOperation(c98940013.ttop)
e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3)
--triple tribute(require 3 tributes, set)
local e4=e3:Clone()
e4:SetCode(EFFECT_LIMIT_SET_PROC)
e4:SetTarget(c98940013.tttg2)
c:RegisterEffect(e4)
--triple tribute(can tribute 3 monsters, summon)
local e5=e3:Clone()
e5:SetCode(EFFECT_SUMMON_PROC)
e5:SetTarget(c98940013.tttg3)
e5:SetValue(SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
c:RegisterEffect(e5)
--triple tribute(can tribute 3 monsters, set)
--(reserved)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetTargetRange(1,1)
e6:SetValue(c98940013.actlimit)
c:RegisterEffect(e6)
--attack limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c98940013.atktg)
c:RegisterEffect(e1)
end
function c98940013.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetAttack()<e:GetHandler():GetAttack()
end
function c98940013.atktg(e,c)
return c:GetAttack()<e:GetHandler():GetAttack()
end
function c98940013.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)
end
function c98940013.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c98940013.hspfilter(c,tp,sc)
return c:IsAttack(0) and c:IsRace(RACE_AQUA) and c:IsLevel(10)
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function c98940013.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(c:GetControler(),c98940013.hspfilter,1,nil,c:GetControler(),c)
end
function c98940013.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,c98940013.hspfilter,1,1,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
end
function c98940013.ttfilter(c,tp)
return c:IsHasEffect(98940013) and c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0
end
function c98940013.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc<=3 and Duel.IsExistingMatchingCard(c98940013.ttfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c98940013.tttg1(e,c)
return c:IsCode(10000000,10000010,10000020,10000080,21208154,57793869,57761191,62180201)
end
function c98940013.tttg2(e,c)
return c:IsCode(21208154,57793869,62180201)
end
function c98940013.tttg3(e,c)
return c:IsCode(3912064,25524823,36354007,75285069,78651105)
end
\ No newline at end of file
--十二兽 鼠威
function c98940019.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_BEASTWARRIOR),5,2,c98940019.ovfilter,aux.Stringid(98940019,0),99,c98940019.xyzop)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c98940019.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c98940019.defval)
c:RegisterEffect(e2)
--xyzlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e3:SetValue(1)
c:RegisterEffect(e3)
--Negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(98940019,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCondition(c98940019.condition)
e4:SetCost(c98940019.cost)
e4:SetTarget(c98940019.target)
e4:SetOperation(c98940019.operation)
c:RegisterEffect(e4)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98940019,2))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCost(c98940019.cost)
e1:SetCondition(c98940019.thcon)
e1:SetTarget(c98940019.thtg)
e1:SetOperation(c98940019.thop)
c:RegisterEffect(e1)
end
function c98940019.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf1) and not c:IsCode(98940019)
end
function c98940019.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,98940019)==0 end
Duel.RegisterFlagEffect(tp,98940019,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c98940019.atkfilter(c)
return c:IsSetCard(0xf1) and c:GetAttack()>=0
end
function c98940019.atkval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c98940019.atkfilter,nil)
return g:GetSum(Card.GetAttack)
end
function c98940019.deffilter(c)
return c:IsSetCard(0xf1) and c:GetDefense()>=0
end
function c98940019.defval(e,c)
local g=e:GetHandler():GetOverlayGroup():Filter(c98940019.deffilter,nil)
return g:GetSum(Card.GetDefense)
end
function c98940019.condition(e,tp,eg,ep,ev,re,r,rp)
local attr=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTRIBUTE)
return ep~=tp and Duel.IsChainNegatable(ev)
end
function c98940019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c98940019.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c98940019.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c98940019.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function c98940019.thfilter(c)
return c:IsSetCard(0xf1) and c:IsAbleToHand()
end
function c98940019.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98940019.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98940019.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98940019.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
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