Commit ce21c584 authored by Nemo Ma's avatar Nemo Ma

fix

parent 625f2ec1
......@@ -17,11 +17,10 @@ function c10173077.initial_effect(c)
c:RegisterEffect(e2)
end
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)
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
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
function c10173077.cfilter(c,tp)
......
......@@ -58,7 +58,7 @@ function c22070190.retop(e,tp,eg,ep,ev,re,r,rp)
end
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
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
......
......@@ -96,7 +96,7 @@ end
function cm.spcon(e,c)
if c==nil then return true end
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
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
......
......@@ -100,7 +100,7 @@ end
function cm.spcon(e,c)
if c==nil then return true end
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
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
......
......@@ -9,7 +9,6 @@ end
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
......@@ -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
end
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
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
......
......@@ -18,7 +18,7 @@ function cm.initial_effect(c)
local e3=e2:Clone()
e3:SetCode(EFFECT_SUMMON_COST)
e3:SetProperty(0)
e3:SetTargetRange(0xff,0xff)
e3:SetTargetRange(0xff,0)
e3:SetTarget(cm.costtg)
c:RegisterEffect(e3)
local e4=e3:Clone()
......
......@@ -76,6 +76,7 @@ end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.getfusionfilter,tp,LOCATION_ONFIELD,0,nil,tp,c)
return g:GetCount()>0
end
......
......@@ -14,8 +14,8 @@ function c72100051.initial_effect(c)
c:RegisterEffect(e1)
end
function c72100051.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c72100051.target(e,tp,eg,ep,ev,re,r,rp,chk)
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