Commit ce21c584 authored by Nemo Ma's avatar Nemo Ma

fix

parent 625f2ec1
...@@ -17,11 +17,10 @@ function c10173077.initial_effect(c) ...@@ -17,11 +17,10 @@ function c10173077.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c10173077.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c10173077.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
local bool=e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) local bool=e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND)
if chk==0 then return not bool or Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end if chk==0 then return not bool or Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
if bool then if bool then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
end end
function c10173077.cfilter(c,tp) function c10173077.cfilter(c,tp)
......
...@@ -58,7 +58,7 @@ function c22070190.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c22070190.retop(e,tp,eg,ep,ev,re,r,rp)
end end
function c22070190.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c22070190.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler(),tp,LOCATION_REASON_TOFIELD,0x1f)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22070131,0xa3,0x4011,2500,2000,8,RACE_DRAGON,ATTRIBUTE_WIND) end and Duel.IsPlayerCanSpecialSummonMonster(tp,22070131,0xa3,0x4011,2500,2000,8,RACE_DRAGON,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
......
...@@ -96,7 +96,7 @@ end ...@@ -96,7 +96,7 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return c:IsPosition(POS_FACEUP_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) return c:IsPosition(POS_FACEUP_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
......
...@@ -100,7 +100,7 @@ end ...@@ -100,7 +100,7 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return c:IsPosition(POS_FACEUP_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) return c:IsPosition(POS_FACEUP_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
......
...@@ -9,7 +9,6 @@ end ...@@ -9,7 +9,6 @@ end
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
...@@ -55,6 +54,17 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -55,6 +54,17 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1 op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end end
e:SetLabel(op) e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_DECKDES+CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
elseif op==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
elseif op==2 then
e:SetCategory(CATEGORY_DECKDES+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
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)
local op=e:GetLabel() local op=e:GetLabel()
......
...@@ -18,7 +18,7 @@ function cm.initial_effect(c) ...@@ -18,7 +18,7 @@ function cm.initial_effect(c)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_SUMMON_COST) e3:SetCode(EFFECT_SUMMON_COST)
e3:SetProperty(0) e3:SetProperty(0)
e3:SetTargetRange(0xff,0xff) e3:SetTargetRange(0xff,0)
e3:SetTarget(cm.costtg) e3:SetTarget(cm.costtg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
......
...@@ -76,6 +76,7 @@ end ...@@ -76,6 +76,7 @@ end
function cm.sprcon(e,c) function cm.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.getfusionfilter,tp,LOCATION_ONFIELD,0,nil,tp,c) local g=Duel.GetMatchingGroup(cm.getfusionfilter,tp,LOCATION_ONFIELD,0,nil,tp,c)
return g:GetCount()>0 return g:GetCount()>0
end end
......
...@@ -14,8 +14,8 @@ function c72100051.initial_effect(c) ...@@ -14,8 +14,8 @@ function c72100051.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c72100051.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c72100051.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c72100051.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72100051.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true 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