Commit a547650d authored by songtongtong's avatar songtongtong

bug fix

parent 203a96fb
...@@ -41,7 +41,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -41,7 +41,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
--send to grave --send to grave
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0x3567) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x3567) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(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.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -37,11 +37,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,11 +37,11 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.cfilter(c,re) function cm.cfilter(c,r,re)
return (c:IsReason(REASON_BATTLE) and c:GetReasonCard():IsSetCard(0x6410)) or (c:IsReason(REASON_EFFECT) and re and re:GetOwner():IsSetCard(0x6410)) return (r&REASON_BATTLE~=0 and c:GetReasonCard():IsSetCard(0x6410)) or (c:IsReason(REASON_EFFECT) and re and re:GetOwner():IsSetCard(0x6410))
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>Duel.GetFlagEffect(tp,m+1) and eg:IsExists(cm.cfilter,1,nil,re) return Duel.GetFlagEffect(tp,m)>Duel.GetFlagEffect(tp,m+1) and eg:IsExists(cm.cfilter,1,nil,r,re)
end end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x6410) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x6410) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
...@@ -22,10 +22,10 @@ function cm.initial_effect(c) ...@@ -22,10 +22,10 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,m+100) e3:SetCountLimit(1,6011708)
e3:SetCondition(cm.spcon2) e3:SetCondition(c60151708.spcon2)
e3:SetTarget(cm.sptg2) e3:SetTarget(c60151708.sptg2)
e3:SetOperation(cm.spop2) e3:SetOperation(c60151708.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -62,22 +62,22 @@ end ...@@ -62,22 +62,22 @@ end
function cm.ffilter(c,e,tp) function cm.ffilter(c,e,tp)
return c:IsSetCard(0x3b26) and c:IsFaceup() return c:IsSetCard(0x3b26) and c:IsFaceup()
end end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp) function c60151708.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsReason(REASON_EFFECT)
end end
function cm.thfilter(c,e,tp) function c60151708.thfilter(c,e,tp)
return c:IsSetCard(0x3b26) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3b26) and not c:IsCode(60151708) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c60151708.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c60151708.thfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c60151708.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c60151708.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst() Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c60151708.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -37,7 +37,7 @@ function c64832013.initial_effect(c) ...@@ -37,7 +37,7 @@ function c64832013.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1+EFFECT_COUNT_CODE_SINGLE) e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCondition(c64832013.thcon) e4:SetCondition(c64832013.thcon)
e4:SetTarget(c64832013.thtg) e4:SetTarget(c64832013.thtg)
e4:SetOperation(c64832013.thop) e4:SetOperation(c64832013.thop)
......
...@@ -15,6 +15,7 @@ function cm.initial_effect(c) ...@@ -15,6 +15,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
cm.Attack_Defense_Listed=1 cm.Attack_Defense_Listed=1
end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsAttack(1550) and c:IsDefense(1050) return c:IsFaceup() and c:IsAttack(1550) and c:IsDefense(1050)
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