Commit 2beceef1 authored by Nemo Ma's avatar Nemo Ma

fix

parent 04fc15c0
......@@ -77,7 +77,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(function(e,c) return c:IsSetCard(0x6978) and c:IsFaceup() end)
e3:SetValue(1)
e3:SetValue(function(e,re,r,rp) if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then return 1 else return 0 end)
Duel.RegisterEffect(e3,tp)
end
end
......
......@@ -125,7 +125,7 @@ end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=e:GetHandler():GetCardTarget()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,g) and c:IsCanTurnSet() end
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,g) and c:IsCanTurnSet() and (not re or re:GetCode()~=EFFECT_SPSUMMON_PROC or Duel.GetLocationCountFromEx(re:GetHandlerPlayer(),re:GetHandlerPlayer(),Group.__sub(eg,g),re:GetHandler())>0) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
g:KeepAlive()
e:SetLabelObject(g)
......
......@@ -39,7 +39,7 @@ function cm.eop(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetMatchingGroup(cm.cefilter,tp,0xff,0xff,nil,ev)
if ag:GetCount()~=0 then
Duel.Hint(HINT_CARD,tp,15000294)
local bg=ag:RandomSelect(ag,tp,1)
local bg=ag:RandomSelect(tp,1)
if bg:GetCount()==1 then
Duel.HintSelection(bg)
Duel.ChangeTargetCard(ev,bg)
......
......@@ -20,7 +20,7 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetRange(LOCATION_MZONE+LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.thtg)
......
......@@ -32,7 +32,7 @@ function cm.spfilter(c,e,tp,code)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or e:GetHandler():IsLocation(LOCATION_SZONE)) and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
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