Commit 2c49ca14 authored by Tachibana's avatar Tachibana

nmbd

parent 2893aadb
...@@ -19,7 +19,7 @@ function cm.initial_effect(c) ...@@ -19,7 +19,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.hand(e,tp,eg,ep,ev,re,r,rp) function cm.hand(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_HAND,0,1,nil)
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_RITUAL) and c:IsAbleToRemoveAsCost() return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_RITUAL) and c:IsAbleToRemoveAsCost()
...@@ -28,7 +28,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,cm.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_HAND,0,1,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
local g1=Duel.GetOperatedGroup() local g1=Duel.GetOperatedGroup()
g1:KeepAlive() g1:KeepAlive()
...@@ -40,16 +40,16 @@ function cm.setfilter(c) ...@@ -40,16 +40,16 @@ function cm.setfilter(c)
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)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,e:GetHandlerPlayer(),HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,0xe000e0) local flag=Duel.SelectField(e:GetHandlerPlayer(),1,0,LOCATION_ONFIELD,0xe000e0)
local seq=math.log(flag>>16,2) local seq=math.log(flag>>16,2)
e:SetLabel(seq) e:SetLabel(seq)
Duel.Hint(HINT_ZONE,tp,flag) Duel.Hint(HINT_ZONE,e:GetHandlerPlayer(),flag)
if e:GetLabelObject() and e:GetLabelObject():GetCount()>0 then if e:GetLabelObject() and e:GetLabelObject():GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,e:GetHandlerPlayer(),1)
end end
if e:GetLabelObject() and e:GetLabelObject():GetCount()>1 then if e:GetLabelObject() and e:GetLabelObject():GetCount()>1 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,e:GetHandlerPlayer(),LOCATION_REMOVED)
end end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -10,7 +10,6 @@ c:EnableReviveLimit() ...@@ -10,7 +10,6 @@ c:EnableReviveLimit()
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -42,10 +41,6 @@ c:EnableReviveLimit() ...@@ -42,10 +41,6 @@ c:EnableReviveLimit()
e4:SetOperation(cm.indop) e4:SetOperation(cm.indop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function cm.mfilterf(c,tp,mg,rc) function cm.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c) Duel.SetSelectedCard(c)
...@@ -96,7 +91,7 @@ function cm.thfilter(c) ...@@ -96,7 +91,7 @@ function cm.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsAbleToHand() return c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,e:GetHandlerPlayer(),LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
......
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