Commit 8d546aac authored by Nemo Ma's avatar Nemo Ma

fix

parent 65897eec
...@@ -65,7 +65,7 @@ function cm.tdfilter(c) ...@@ -65,7 +65,7 @@ function cm.tdfilter(c)
return c:IsAbleToDeckAsCost() and tama.tamas_isExistElement(c,TAMA_ELEMENT_LIFE) return c:IsAbleToDeckAsCost() and tama.tamas_isExistElement(c,TAMA_ELEMENT_LIFE)
end end
function cm.spfilter(c,sg,e,tp) function cm.spfilter(c,sg,e,tp)
return c:IsType(TYPE_MONSTER) and tama.tamas_isExistElement(c,TAMA_ELEMENT_LIFE) and sg:GetSum(tamas_getElementCount,TAMA_ELEMENT_LIFE)>=tamas_getElementCount(c,TAMA_ELEMENT_LIFE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_MONSTER) and tama.tamas_isExistElement(c,TAMA_ELEMENT_LIFE) and sg:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_LIFE)>=tama.tamas_getElementCount(c,TAMA_ELEMENT_LIFE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -69,10 +69,11 @@ end ...@@ -69,10 +69,11 @@ end
function cm.valop(e,tp,eg,ep,ev,re,r,rp) function cm.valop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_LINK) then return end if not c:IsSummonType(SUMMON_TYPE_LINK) then return end
local tc=c:GetMaterial():GetFirst()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetMaterial():GetFirst():GetAttack()) e1:SetValue(tc:GetPreviousAttackOnField())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -48,12 +48,12 @@ function c29010014.ctfil(c) ...@@ -48,12 +48,12 @@ function c29010014.ctfil(c)
return c:IsSetCard(0x87af) and c:IsAbleToDeckAsCost() return c:IsSetCard(0x87af) and c:IsAbleToDeckAsCost()
end end
function c29010014.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c29010014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010014.ctfil,tp,LOCATION_GRAVE,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c29010014.ctfil,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c29010014.ctfil,tp,LOCATION_GRAVE,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,c29010014.ctfil,tp,LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.SendtoDeck(g,tp,2,REASON_COST) Duel.SendtoDeck(g,tp,2,REASON_COST)
end end
function c29010014.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c29010014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,22702055) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end end
function c29010014.spop(e,tp,eg,ep,ev,re,r,rp) function c29010014.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,7 +12,7 @@ function c33401302.initial_effect(c) ...@@ -12,7 +12,7 @@ function c33401302.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,33401302) e2:SetCountLimit(1,33401302)
e2:SetCondition(c33401302.spcon) e2:SetCondition(c33401302.spcon)
e2:SetTarget(c33401302.sptg) e2:SetTarget(c33401302.sptg)
......
...@@ -31,16 +31,13 @@ function cm.seqcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,16 +31,13 @@ function cm.seqcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function cm.chkfilter1(c,e,tp) function cm.chkfilter1(c,e,tp)
return (not c:IsSetCard(0xc342)) and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and Duel.IsPlayerCanSpecialSummon(tp,0,POS_FACEUP,1-tp,c) return (not c:IsSetCard(0xc342)) and c:IsSetCard(0x341) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end end
function cm.chkfilter2(c,tp) function cm.chkfilter2(c,tp)
return c:IsSetCard(0x341) and c:IsType(TYPE_FIELD) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp)) return c:IsSetCard(0x341) and c:IsType(TYPE_FIELD) and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp))
end end
function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_FZONE,0,1,nil,0x341) and Duel.IsExistingMatchingCard(cm.chkfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.chkfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_FZONE,0,1,nil,0x341) and Duel.IsExistingMatchingCard(cm.chkfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and Duel.IsExistingMatchingCard(cm.chkfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,nil,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,nil,LOCATION_DECK+LOCATION_GRAVE)
end end
...@@ -51,7 +48,7 @@ local c=e:GetHandler() ...@@ -51,7 +48,7 @@ local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=sg:Select(tp,1,1,nil) local g1=sg:Select(tp,1,1,nil)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
Duel.SpecialSummon(tc1,0,tp,1-tp,false,false,POS_FACEUP) if Duel.SpecialSummonStep(tc1,0,tp,1-tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
...@@ -62,7 +59,6 @@ local c=e:GetHandler() ...@@ -62,7 +59,6 @@ local c=e:GetHandler()
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e2) tc1:RegisterEffect(e2)
end
if Duel.IsExistingMatchingCard(cm.chkfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) then if Duel.IsExistingMatchingCard(cm.chkfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g=Duel.SelectMatchingCard(tp,cm.chkfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.chkfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
...@@ -84,13 +80,17 @@ local c=e:GetHandler() ...@@ -84,13 +80,17 @@ local c=e:GetHandler()
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then
cost(te,tep,eg,ep,ev,re,r,rp,1)
end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end end
end end
end end
Duel.SpecialSummonComplete()
end
end
end end
function cm.filter(c,e,tp,re) function cm.filter(c,e,tp,re)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsReason(REASON_EFFECT+REASON_BATTLE)
......
...@@ -21,7 +21,7 @@ function cm.cfilter(c,tp) ...@@ -21,7 +21,7 @@ function cm.cfilter(c,tp)
return c:GetPreviousControler()==tp return c:GetPreviousControler()==tp
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) and Duel.GetTurnPlayer()~=tp return not eg:IsExists(cm.cfilter,1,nil,tp) and Duel.GetTurnPlayer()~=tp
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -59,6 +59,7 @@ function c79029534.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,6 +59,7 @@ function c79029534.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end
end end
function c79029534.distg(e,c) function c79029534.distg(e,c)
return c:IsType(e:GetLabel()) return c:IsType(e:GetLabel())
...@@ -87,5 +88,3 @@ function c79029534.dcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,5 +88,3 @@ function c79029534.dcop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -162,16 +162,16 @@ function cm.thcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -162,16 +162,16 @@ function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp) return c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)
end end
function cm.thfilter(c) function cm.thfilter2(c)
return c:IsSetCard(0xcc30) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0xcc30) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp) function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -36,7 +36,8 @@ function cm.initial_effect(c) ...@@ -36,7 +36,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e5:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE) e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,m+100000000) e5:SetCountLimit(1,m+100000000)
......
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