Commit a98bd7ae authored by Nemo Ma's avatar Nemo Ma

fix

parent 75c24b69
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -14,8 +15,15 @@ end ...@@ -14,8 +15,15 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentChain()==0 and not Duel.CheckPhaseActivity() return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==1-tp and Duel.GetCurrentChain()==0 and not Duel.CheckPhaseActivity()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
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)
if chk==0 then return true end if chk==0 then
if e:GetLabel()>0 then e:SetLabel(0) return true end
return false
end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,16 +32,16 @@ function cm.initial_effect(c) ...@@ -32,16 +32,16 @@ function cm.initial_effect(c)
e3:SetCode(EFFECT_DUAL_STATUS) e3:SetCode(EFFECT_DUAL_STATUS)
e3:SetCondition(cm.dscon) e3:SetCondition(cm.dscon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2)) e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_HAND) e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCost(cm.thcost) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(cm.thtg) e4:SetCondition(cm.bmcon)
e4:SetOperation(cm.thop) e4:SetTarget(cm.bmtg)
c:RegisterEffect(e4) e4:SetOperation(cm.bmop)
c:RegisterEffect(e4)
end end
function cm.lvfilter(c) function cm.lvfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetLevel()>0 return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetLevel()>0
...@@ -87,22 +87,22 @@ end ...@@ -87,22 +87,22 @@ end
function cm.dscon(e) function cm.dscon(e)
return e:GetHandler():IsLevelAbove(2) return e:GetHandler():IsLevelAbove(2)
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end return c and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) and (r==REASON_FUSION or c:IsReason(REASON_FUSION)) and c:GetPreviousLevelOnField()>=2 and bit.band(TYPE_EFFECT,c:GetPreviousTypeOnField())~=0
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function cm.thfilter(c) function cm.ffilter(c)
return c:IsCode(24094653) and c:IsAbleToHand() return c:IsCode(24094653) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.bmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.ffilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) 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)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tg then local g=Duel.SelectMatchingCard(tp,cm.ffilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,tg) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -34,15 +34,15 @@ function cm.initial_effect(c) ...@@ -34,15 +34,15 @@ function cm.initial_effect(c)
e3:SetCode(EFFECT_DUAL_STATUS) e3:SetCode(EFFECT_DUAL_STATUS)
e3:SetCondition(cm.dscon) e3:SetCondition(cm.dscon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2)) e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_HAND) e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCondition(cm.spcon) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(cm.sptg) e4:SetCondition(cm.bmcon)
e4:SetOperation(cm.spop) e4:SetTarget(cm.bmtg)
e4:SetOperation(cm.bmop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
...@@ -111,20 +111,18 @@ end ...@@ -111,20 +111,18 @@ end
function cm.dscon(e) function cm.dscon(e)
return e:GetHandler():IsLevelAbove(3) return e:GetHandler():IsLevelAbove(3)
end end
function cm.cfilter(c) function cm.bmcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and c:IsRace(RACE_PLANT) local c=e:GetHandler()
end return c and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) and (r==REASON_FUSION or c:IsReason(REASON_FUSION)) and c:GetPreviousLevelOnField()>=3 and bit.band(TYPE_EFFECT,c:GetPreviousTypeOnField())~=0
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g>0 and #g==Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.bmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -34,15 +34,15 @@ function cm.initial_effect(c) ...@@ -34,15 +34,15 @@ function cm.initial_effect(c)
e3:SetCode(EFFECT_DUAL_STATUS) e3:SetCode(EFFECT_DUAL_STATUS)
e3:SetCondition(cm.dscon) e3:SetCondition(cm.dscon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2)) e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_HAND) e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCost(cm.thcost1) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(cm.thtg1) e4:SetCondition(cm.bmcon)
e4:SetOperation(cm.thop1) e4:SetTarget(cm.bmtg)
e4:SetOperation(cm.bmop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
...@@ -126,22 +126,3 @@ function cm.bmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,22 +126,3 @@ function cm.bmop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function cm.thcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.thfilter1(c)
return c:IsCode(14090020) and c:IsAbleToHand() and c:IsFaceup()
end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(cm.thfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
...@@ -24,15 +24,15 @@ function cm.initial_effect(c) ...@@ -24,15 +24,15 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_DUAL_STATUS) e2:SetCode(EFFECT_DUAL_STATUS)
e2:SetCondition(cm.dscon) e2:SetCondition(cm.dscon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_HAND) e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCost(cm.thcost) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.thtg) e3:SetCondition(cm.bmcon)
e3:SetOperation(cm.thop) e3:SetTarget(cm.bmtg)
e3:SetOperation(cm.bmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.global_check=true
...@@ -82,22 +82,22 @@ end ...@@ -82,22 +82,22 @@ end
function cm.dscon(e) function cm.dscon(e)
return e:GetHandler():IsLevelAbove(5) return e:GetHandler():IsLevelAbove(5)
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end return c and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) and (r==REASON_FUSION or c:IsReason(REASON_FUSION)) and c:GetPreviousLevelOnField()>=5 and bit.band(TYPE_EFFECT,c:GetPreviousTypeOnField())~=0
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function cm.thfilter(c) function cm.ffilter(c)
return c:IsCode(14090027) and c:IsAbleToHand() return c:IsCode(14090027) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.bmtg(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.ffilter,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.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tg then local g=Duel.SelectMatchingCard(tp,cm.ffilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,tg) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -23,15 +23,15 @@ function cm.initial_effect(c) ...@@ -23,15 +23,15 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_DUAL_STATUS) e2:SetCode(EFFECT_DUAL_STATUS)
e2:SetCondition(cm.dscon) e2:SetCondition(cm.dscon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_HAND) e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCost(cm.thcost) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.thtg) e3:SetCondition(cm.bmcon)
e3:SetOperation(cm.thop) e3:SetTarget(cm.bmtg)
e3:SetOperation(cm.bmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.costfilter(c,tp) function cm.costfilter(c,tp)
...@@ -64,22 +64,22 @@ end ...@@ -64,22 +64,22 @@ end
function cm.dscon(e) function cm.dscon(e)
return e:GetHandler():IsLevelAbove(6) return e:GetHandler():IsLevelAbove(6)
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end return c and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) and (r==REASON_FUSION or c:IsReason(REASON_FUSION)) and c:GetPreviousLevelOnField()>=6 and bit.band(TYPE_EFFECT,c:GetPreviousTypeOnField())~=0
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function cm.thfilter(c) function cm.ffilter(c)
return c:IsCode(14090026) and c:IsAbleToHand() return c:IsCode(14090026) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.bmtg(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.ffilter,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.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tg then local g=Duel.SelectMatchingCard(tp,cm.ffilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,tg) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -22,15 +22,15 @@ function cm.initial_effect(c) ...@@ -22,15 +22,15 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_DUAL_STATUS) e2:SetCode(EFFECT_DUAL_STATUS)
e2:SetCondition(cm.dscon) e2:SetCondition(cm.dscon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_HAND) e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCost(cm.thcost) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.thtg) e3:SetCondition(cm.bmcon)
e3:SetOperation(cm.thop) e3:SetTarget(cm.bmtg)
e3:SetOperation(cm.bmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp) function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -63,23 +63,20 @@ end ...@@ -63,23 +63,20 @@ end
function cm.dscon(e) function cm.dscon(e)
return e:GetHandler():IsLevelAbove(7) return e:GetHandler():IsLevelAbove(7)
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end return c and c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED)) and (r==REASON_FUSION or c:IsReason(REASON_FUSION)) and c:GetPreviousLevelOnField()>=7 and bit.band(TYPE_EFFECT,c:GetPreviousTypeOnField())~=0
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end end
function cm.thfilter(c) function cm.ffilter(c)
return c:IsRace(RACE_PLANT) and c:IsType(TYPE_DUAL) and not c:IsCode(m) and c:IsAbleToHand() return c:IsCode(14090026) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.bmtg(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 true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.bmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local tg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.Damage(p,d,REASON_EFFECT)
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
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