Commit edc59734 authored by Nemo Ma's avatar Nemo Ma

fix

parent df9f931e
......@@ -25,7 +25,7 @@ function cm.initial_effect(c)
end
function cm.tgtfilter(c)
return c:IsCode(10788912) and c:IsAbleToHand()
return c:IsCode(10888912) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -67,7 +67,7 @@ function cm.tgrtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.tgrop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.tgtgrfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
......
......@@ -25,6 +25,9 @@ function cm.initial_effect(c)
e2:SetTarget(cm.setg)
e2:SetOperation(cm.seop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function cm.tgtfilter(c)
......@@ -50,7 +53,7 @@ function cm.tgs1filter(c)
end
function cm.tgs2filter(c)
return c:IsCode(10788912) and c:IsAbleToHand()
return c:IsCode(10888912) and c:IsAbleToHand()
end
function cm.secon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -142,4 +142,5 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end
tc=g:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
end
\ No newline at end of file
......@@ -79,7 +79,7 @@ function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil,10788912) then
if Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil,10888912) then
e:GetHandler():AddCounter(0x13,4)
else
e:GetHandler():AddCounter(0x13,2)
......
......@@ -37,7 +37,7 @@ end
function cm.actcon(e)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_TRAP)
or Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,10788912)
or Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,10888912)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -31,7 +31,7 @@ end
function cm.actcon(e)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_TRAP)
or Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,10788912)
or Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,10888912)
end
function cm.filter(c)
......
......@@ -17,7 +17,6 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
......@@ -34,7 +33,7 @@ end
function cm.actcon(e)
return not Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_TRAP)
or Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,10788912)
or Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,10888912)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -64,10 +63,6 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.costsplimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x773) and not c:IsLocation(LOCATION_EXTRA)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x773) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
......
......@@ -37,6 +37,9 @@ function cm.filter1(c,e)
return c:IsLocation(LOCATION_MZONE) and c:IsFacedown() and not c:IsImmuneToEffect(e)
end
function cm.spfilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.spfilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -50,7 +53,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local fgroup=ce:GetTarget()
local mg4=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg4,mf,chkf)
res=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg4,mf,chkf)
end
end
return res
......@@ -68,7 +71,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local fgroup=ce:GetTarget()
mg4=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg3=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg4,mf,chkf)
sg3=Duel.GetMatchingGroup(cm.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg4,mf,chkf)
end
if #sg1>0 or (sg3~=nil and #sg3>0) then
local sg=sg1:Clone()
......
......@@ -106,6 +106,7 @@ function cm.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil)
Duel.Release(rg,REASON_COST)
g=Duel.GetFieldGroup(tp,LOCATION_EXTRA,LOCATION_EXTRA)
Duel.SendtoGrave(g,REASON_COST)
local ct=g:FilterCount(cm.dfilter,nil)
e:SetLabel(ct)
......
......@@ -59,7 +59,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if rflag then Duel.BreakEffect() end
Duel.Draw(tp,1,REASON_EFFECT)
end
if ct>=3 then
if ct==3 then
local lab=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -31,12 +31,44 @@ function cm.initial_effect(c)
e3:SetCondition(cm.rcon)
e3:SetOperation(cm.rop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(m)
e4:SetRange(LOCATION_MZONE)
c:RegisterEffect(e4)
if not GIGANTIC_JET then
GIGANTIC_JET=true
local _DGetCounter=Duel.GetCounter
local _CGetCounter=Card.GetCounter
function Duel.GetCounter(p,s,o,typ)
local ct=_DGetCounter(p,s,o,typ)
local s1,o1=s,o
if s==1 then s1=0xff end
if o==1 then o1=0xff end
local g=Duel.GetMatchingGroup(Card.IsHasEffect,p,s1,o1,nil,m)
if #g>0 then
for tc in aux.Next(g) do
local og=tc:GetOverlayGroup()
if og and #og>0 then ct=ct+og:FilterCount(cm.filter,nil) end
end
end
return ct
end
function Card.GetCounter(c,typ)
local ct=_CGetCounter(c,typ)
if c:IsHasEffect(m) then
local og=c:GetOverlayGroup()
if og and #og>0 then ct=ct+og:FilterCount(cm.filter,nil) end
end
return ct
end
end
end
function cm.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,2) or c:IsSetCard(0x18)
end
function cm.filter(c)
return not c:IsLevel(2)
return c:IsType(TYPE_MONSTER) and not c:IsLevel(2)
end
function cm.adcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(cm.filter,1,nil)
......
......@@ -27,6 +27,7 @@ function c22021430.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,22021431)
e3:SetCondition(c22021430.spcon)
e3:SetTarget(c22021430.target)
......@@ -64,14 +65,15 @@ function c22021430.filter(c,e,sp)
return c:IsSetCard(0xff1) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c22021430.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22021430.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22021430.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c22021430.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sc=Duel.GetFirstMatchingCard(c22021430.filter,tp,LOCATION_DECK,0,nil,e,tp)
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22021430.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -12,7 +12,7 @@ function c22021460.initial_effect(c)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22021260,1))
e2:SetDescription(aux.Stringid(22021460,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
......@@ -23,7 +23,7 @@ function c22021460.initial_effect(c)
c:RegisterEffect(e2)
--cannot
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22021260,2))
e3:SetDescription(aux.Stringid(22021460,2))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
......
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