Commit e60bcdb8 authored by Tachibana's avatar Tachibana

nmbd

parent b695017f
......@@ -15,26 +15,26 @@ function cm.initial_effect(c)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.imcon)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.imcon)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.rthcost)
e3:SetTarget(cm.rthtg)
e3:SetOperation(cm.rthop)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.rthcost)
e1:SetTarget(cm.rthtg)
e1:SetOperation(cm.rthop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.table={}
cm.global_check=true
......@@ -72,8 +72,7 @@ function cm.efilter(e,te)
end
function cm.rthcfilter(c,e)
local cp=e:GetHandlerPlayer()
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHandAsCost() and Duel.GetMZoneCount(tp,c,cp)>0
e:SetLabel(cp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHandAsCost() and Duel.GetMZoneCount(tp,c,cp)>0
end
function cm.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -81,6 +80,7 @@ function cm.rthcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.rthcfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,e)
Duel.SendtoHand(g,nil,REASON_COST)
e:SetLabel(g:GetFirst():GetHandlerPlayer())
end
function cm.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
......
......@@ -83,6 +83,7 @@ function cm.immop(e,tp,eg,ep,ev,re,r,rp)
if #cg==0 then return end
Duel.ConfirmCards(tp,cg)
if not cg:IsExists(cm.thfilter6,1,nil,tp) then Duel.ShuffleHand(1-tp) return end
Duel.ShuffleHand(1-tp)
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
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