Commit 0087483c authored by REIKAI's avatar REIKAI 💬

bug fix

parent 377306d2
expansions/pics/11600016.jpg

39.7 KB | W: | H:

expansions/pics/11600016.jpg

106 KB | W: | H:

expansions/pics/11600016.jpg
expansions/pics/11600016.jpg
expansions/pics/11600016.jpg
expansions/pics/11600016.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/31300005.jpg

43.5 KB | W: | H:

expansions/pics/31300005.jpg

40.3 KB | W: | H:

expansions/pics/31300005.jpg
expansions/pics/31300005.jpg
expansions/pics/31300005.jpg
expansions/pics/31300005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/31300006.jpg

38.5 KB | W: | H:

expansions/pics/31300006.jpg

42.3 KB | W: | H:

expansions/pics/31300006.jpg
expansions/pics/31300006.jpg
expansions/pics/31300006.jpg
expansions/pics/31300006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/31300009.jpg

46.3 KB | W: | H:

expansions/pics/31300009.jpg

45.6 KB | W: | H:

expansions/pics/31300009.jpg
expansions/pics/31300009.jpg
expansions/pics/31300009.jpg
expansions/pics/31300009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/31300018.jpg

44.4 KB | W: | H:

expansions/pics/31300018.jpg

42.8 KB | W: | H:

expansions/pics/31300018.jpg
expansions/pics/31300018.jpg
expansions/pics/31300018.jpg
expansions/pics/31300018.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/81901005.jpg

60.8 KB | W: | H:

expansions/pics/field/81901005.jpg

83.3 KB | W: | H:

expansions/pics/field/81901005.jpg
expansions/pics/field/81901005.jpg
expansions/pics/field/81901005.jpg
expansions/pics/field/81901005.jpg
  • 2-up
  • Swipe
  • Onion skin
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -17,7 +17,6 @@ function c10220012.initial_effect(c)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10220012+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c10220012.co)
e2:SetTarget(c10220012.tg)
e2:SetOperation(c10220012.op)
c:RegisterEffect(e2)
......@@ -42,11 +41,9 @@ function c10220012.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c10220012.co(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10220012.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c10220012.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
if chk==0 then return Duel.IsExistingTarget(c10220012.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
end
end
function c10220012.op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -18,7 +18,6 @@ function c10220022.initial_effect(c)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10220029+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c10220022.descon)
e2:SetTarget(c10220022.destg)
e2:SetOperation(c10220022.desop)
c:RegisterEffect(e2)
......@@ -51,12 +50,9 @@ function c10220022.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c10220022.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10220022.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c10220022.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
if chk==0 then return #g>0 end
if chk==0 then return Duel.IsExistingTarget(c10220022.filter,tp,LOCATION_MZONE,0,1,nil) and #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
......
......@@ -106,20 +106,16 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if not eg:IsContains(tc) then return end
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then
e:Reset()
return
if c:GetFlagEffectLabel(m) then
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-c:GetFlagEffectLabel(m))
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
c:ResetFlagEffect(m)
end
local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-c:GetFlagEffectLabel(m))
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
c:ResetFlagEffect(m)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10220099+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
......@@ -57,7 +56,8 @@ function cm.setfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5a0) and c:IsType(TYPE_QUICKPLAY) and c:IsSSetable()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,nil) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsCode,23100005,23100008))
e3:SetValue(800)
......@@ -33,14 +33,14 @@ function cm.initial_effect(c)
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--counter
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e10:SetCode(EVENT_CHAINING)
e10:SetProperty(EFFECT_FLAG_DELAY)
e10:SetRange(LOCATION_SZONE)
e10:SetCondition(cm.condition)
e10:SetOperation(cm.counter)
c:RegisterEffect(e10)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e11:SetCode(EVENT_CHAINING)
e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetRange(LOCATION_SZONE)
e11:SetCondition(cm.condition)
e11:SetOperation(cm.counter)
c:RegisterEffect(e11)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
......
--混沌的轮回 循环
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rscf.DefineCard(30000220)
local m=30000220
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"td,dr",nil,nil,nil,cm.tg,cm.act)
local e2=rsef.I(c,{m,0},nil,"td,dr","tg",LOCATION_GRAVE,aux.exccon,nil,rstg.target({cm.tdfilter,"td",LOCATION_GRAVE+LOCATION_REMOVED,0,2 },rsop.list(Card.IsAbleToDeck,"td"),rsop.list(1,"dr")),cm.drop)
if cm.actct then return end
cm.actct=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,tp)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.act)
c:RegisterEffect(e1)
--Effect 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
if cm.ctcounter==nil then
cm.ctcounter=true
cm[0]=0
cm[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_CHAIN_NEGATED)
ge2:SetOperation(cm.checkop2)
Duel.RegisterEffect(ge2,0)
end
end
function cm.checkfun(att)
return function(c)
return (c:IsType(TYPE_MONSTER) and c:IsAttribute(att)) or ((c:IsComplexType(TYPE_SPELL+TYPE_PENDULUM) and c:GetAttribute()&att>0))
--all
function cm.checkop1(e,tp,eg,ep,ev,re,r,rp)
local ct1,ct2,pl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2,CHAININFO_TRIGGERING_CONTROLER)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and (ct1==30000220 or ct2==30000220) then
cm[pl]=cm[pl]+1
end
end
cm.hnchecks={cm.checkfun(ATTRIBUTE_LIGHT),cm.checkfun(ATTRIBUTE_DARK)}
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsCode(m) then
cm.actct=math.max(cm.actct-1,0)
function cm.checkop2(e,tp,eg,ep,ev,re,r,rp)
local ct1,ct2,pl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CODE,CHAININFO_TRIGGERING_CODE2,CHAININFO_TRIGGERING_CONTROLER)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and (ct1==30000220 or ct2==30000220) then
cm[pl]=cm[pl]-1
end
end
function cm.cfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToDeck()
--Effect 1
function cm.tf(c)
local chk=c:IsType(TYPE_MONSTER)
if c:IsLocation(LOCATION_PZONE) then
chk=c:GetOriginalType()&TYPE_MONSTER~=0
end
local b1=c:IsFaceupEx()
local b2=c:IsAbleToDeck()
local b3=c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
return b1 and b2 and b3 and chk
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroupEach(cm.hnchecks,aux.TRUE) and Duel.IsPlayerCanDraw(tp,cm.actct+3) end
cm.actct=cm.actct+1
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
local g=Duel.GetMatchingGroup(cm.tf,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,nil)
if chk==0 then return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK) and Duel.IsPlayerCanDraw(tp,cm[tp]+2) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,cm[tp]+2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function cm.act(e,tp)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if not g:CheckSubGroupEach(cm.hnchecks,aux.TRUE) then return end
local tg=g:SelectSubGroupEach(tp,cm.hnchecks,false,aux.TRUE)
function cm.act(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(cm[tp])
local g=Duel.GetMatchingGroup(cm.tf,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_PZONE,0,nil)
if not g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:SelectSubGroup(tp,aux.gfcheck,false,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
local hg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #hg>0 then
Duel.ConfirmCards(1-tp,hg)
end
if #hg>0 then Duel.ConfirmCards(1-tp,hg) end
Duel.HintSelection(tg-hg)
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,cm.actct+2,REASON_EFFECT)
end
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)==0 then return false end
local og=Duel.GetOperatedGroup()
local gt=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if gt==0 then return false end
Duel.Draw(tp,cm[tp]+2,REASON_EFFECT)
end
--Effect 2
function cm.df(c,e)
local b1=c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
local b2=c:IsFaceupEx()
local b3=c:IsAbleToDeck()
return b1 and b2 and b3 and c:IsCanBeEffectTarget(e)
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsAbleToDeck()
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ec=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and cm.df(chkc,e) end
local g=Duel.GetMatchingGroup(cm.df,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
if chk==0 then return ec:IsAbleToDeck() and #g>=2 and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,2,2,nil)
Duel.SetTargetCard(sg)
local tg=sg:Clone()
tg:AddCard(ec)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp)
local tg=rsgf.GetTargetGroup()
local c=aux.ExceptThisCard(e)
if not c or #tg<=0 then return end
tg:AddCard(c)
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if #tg>0 and ec:IsRelateToEffect(e) then
local ttg=tg:Clone()
ttg:AddCard(ec)
Duel.SendtoDeck(ttg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -16,7 +16,7 @@ function cm.filter(c)
return c:IsSetCard(0x9343) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......@@ -28,16 +28,16 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0x341,0x4011,0,0,4,RACE_AQUA,ATTRIBUTE_WATER) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local token=Duel.CreateToken(tp,m+1)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,0,LOCATION_MZONE,1,nil,0x341)
if not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x341) and (Duel.IsExistingMatchingCard(Card.IsSetCard,tp,0,LOCATION_MZONE,1,nil,0x341)
or ( Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and
(Duel.IsExistingMatchingCard(cm.cccfilter1,tp,LOCATION_ONFIELD,0,1,nil) or
Duel.IsExistingMatchingCard(cm.cccfilter2,tp,LOCATION_MZONE,0,1,nil)))
Duel.IsExistingMatchingCard(cm.cccfilter2,tp,LOCATION_MZONE,0,1,nil))) )
then
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -34,16 +34,16 @@ function cm.lcheck(g)
end
function cm.desfilter(c,e,tp)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA+LOCATION_HAND,0,1,nil,e,tp,Group.FromCards(c))
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,Group.FromCards(c))
end
function cm.spfilter(c,e,tp,dg)
local tc=dg:GetFirst()
return (c:IsSetCard(0x341) or c:IsAttribute(ATTRIBUTE_WATER)) and ((c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,dg,c)>0 ) or (c:IsLocation(LOCATION_HAND) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or tc:GetSequence()<5))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
return (c:IsSetCard(0x341) or c:IsAttribute(ATTRIBUTE_WATER)) and ((c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,dg,c)>0 ) or (c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 or tc:GetSequence()<5))) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.spfilter2(c,e,tp)
return (c:IsSetCard(0x341) or c:IsAttribute(ATTRIBUTE_WATER))
and ( (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 )
or (c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) )
or (c:IsLocation(LOCATION_HAND++LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) )
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.ckfilter(c)
......@@ -67,7 +67,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_EXTRA+LOCATION_HAND,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter2,tp,LOCATION_EXTRA+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
......
--兽灵-牛鬼与石婴
local id=GetID()
function id.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,37120928)
e1:SetCost(id.ct1)
e1:SetTarget(id.tg1)
e1:SetOperation(id.op1)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCountLimit(1,37120929)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(id.tg2)
e2:SetOperation(id.op2)
c:RegisterEffect(e2)
end
--e1
function id.ct1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(37120928,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(id.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function id.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_FUSION) and c:IsLocation(LOCATION_EXTRA)
end
function id.tgfilter(c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xe80) and c:IsAbleToGrave()
end
function id.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsPlayerCanDiscardDeck(tp,3)
and Duel.IsExistingMatchingCard(id.tgfilter,tp,LOCATION_EXTRA,0,1,c) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function id.op1(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,id.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
--e2
function id.eqfilter(c,tp)
return true
end
function id.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(id.eqfilter,tp,LOCATION_HAND,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND)
end
function id.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,id.eqfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetLabelObject(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(id.eqlimit)
tc:RegisterEffect(e1)
end
end
function id.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
......@@ -23,12 +23,12 @@ function c65030075.initial_effect(c)
e2:SetOperation(c65030075.scop)
c:RegisterEffect(e2)
end
function c65030075.confil(c)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086) and not c:IsType(TYPE_TUNER)
function c65030075.confil(c,tp)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086) and c:IsControler(tp) and not c:IsType(TYPE_TUNER)
end
function c65030075.con(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) and c65030075.confil(rc)
return re:IsActiveType(TYPE_MONSTER) and c65030075.confil(rc,tp)
end
function c65030075.tgfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.IsCodeListed(c,65030086) and not (c:IsLocation(LOCATION_DECK) and Duel.GetFlagEffect(tp,65030075)~=0)
......
......@@ -23,12 +23,12 @@ function c65030077.initial_effect(c)
e2:SetOperation(c65030077.scop)
c:RegisterEffect(e2)
end
function c65030077.confil(c)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086) and not c:IsType(TYPE_TUNER)
function c65030077.confil(c,tp)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086) and c:IsControler(tp) and not c:IsType(TYPE_TUNER)
end
function c65030077.con(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) and c65030077.confil(rc)
return re:IsActiveType(TYPE_MONSTER) and c65030077.confil(rc,tp)
end
function c65030077.tgfil(c)
return c:IsAbleToGrave() and aux.IsCodeListed(c,65030086)
......
......@@ -23,12 +23,12 @@ function c65030079.initial_effect(c)
e2:SetOperation(c65030079.scop)
c:RegisterEffect(e2)
end
function c65030079.confil(c)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086) and not c:IsType(TYPE_TUNER)
function c65030079.confil(c,tp)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086) and c:IsControler(tp) and not c:IsType(TYPE_TUNER)
end
function c65030079.con(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) and c65030079.confil(rc)
return re:IsActiveType(TYPE_MONSTER) and c65030079.confil(rc,tp)
end
function c65030079.tgfil(c)
return c:IsAbleToHand() and c:IsFaceup() and aux.IsCodeListed(c,65030086)
......
......@@ -23,7 +23,7 @@ function c65030083.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_FZONE)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(aux.chainreg)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
......@@ -38,7 +38,6 @@ function c65030083.initial_effect(c)
e5:SetOperation(c65030083.op)
c:RegisterEffect(e5)
end
c65030083.material_type=TYPE_SYNCHRO
function c65030083.synfil(c)
return aux.IsCodeListed(c,65030086) and c:IsType(TYPE_SYNCHRO)
end
......
......@@ -54,12 +54,12 @@ function c65030086.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function c65030086.confil(c)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086)
function c65030086.confil(c,tp)
return c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,65030086) and c:IsControler(tp)
end
function c65030086.tfcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) and c65030086.confil(rc)
return re:IsActiveType(TYPE_MONSTER) and c65030086.confil(rc,tp)
end
function c65030086.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -106,13 +106,15 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local lm=0
while tc do
if tc:IsType(TYPE_LINK) then
mk=tc:GetLink()*1000
local mk=tc:GetLink()*1000
lm=lm+mk
elseif tc:IsType(TYPE_XYZ) then
mk=tc:GetRank()*200
local mk=tc:GetRank()*200
lm=lm+mk
else
mk=tc:GetLevel()*200
local mk=tc:GetLevel()*200
lm=lm+mk
end
lm=lm+mk
tc=g:GetNext()
end
local atk=lm
......
......@@ -48,6 +48,7 @@ function cm.hspcon(e,c)
local g=Duel.GetMatchingGroup(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,nil)
local ct1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local ct2=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if ct1==0 or ct2==0 or #mg==0 then return end
local lv=mg:GetSum(Card.GetLevel)
local ze=aux.SequenceToGlobal(0,LOCATION_MZONE,2)
local b1=mg:GetClassCount(Card.GetLevel)>=3
......@@ -81,26 +82,24 @@ end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
local c=e:GetHandler()
local cg=c:GetColumnGroup()
local cg=c:GetColumnGroupCount()+1
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)
local b2=#cg>0 and Duel.IsPlayerCanDraw(tp,#cg)
local b2=Duel.IsPlayerCanDraw(tp,cg)
if chk==0 then return b1 and b2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,#cg)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,cg)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=c:GetColumnGroup()
local tc=Duel.GetFirstTarget()
local b1=c:IsFaceup() and c:IsRelateToEffect(e) and #cg>0
local b1=c:IsFaceup() and c:IsRelateToEffect(e)
local b2=tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc)
if b1 and b2 then
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)==0 then return end
local dg=c:GetColumnGroup()
Duel.Draw(tp,#dg,REASON_EFFECT)
local dg=c:GetColumnGroupCount()+1
Duel.Draw(tp,dg,REASON_EFFECT)
end
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