Commit 707a491b authored by Nemo Ma's avatar Nemo Ma

fix

parent 575a9f75
......@@ -128,20 +128,24 @@ function c9980236.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c9980236.tdfilter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c9980236.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE+LOCATION_GRAVE)>0 end
local sg=Duel.GetFieldGroup(tp,0,LOCATION_SZONE+LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(c9980236.tdfilter1,tp,0,LOCATION_SZONE+LOCATION_GRAVE,1,c) end
local sg=Duel.GetMatchingGroup(c9980236.tdfilter1,tp,0,LOCATION_SZONE+LOCATION_GRAVE,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
end
function c9980236.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c9980236.tdfilter1,tp,0,LOCATION_SZONE+LOCATION_GRAVE,nil)
local c=e:GetHandler()
local sg=Duel.GetFieldGroup(tp,0,LOCATION_SZONE+LOCATION_GRAVE)
local ct=Duel.SendtoDeck(sg,REASON_EFFECT)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*200)
e1:SetValue(sg:GetCount()*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
......
......@@ -19,19 +19,16 @@ function c9980547.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ATTACK_ALL)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(1)
c:RegisterEffect(e4)
--pierce
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_PIERCE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
c:RegisterEffect(e5)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
......@@ -41,7 +38,6 @@ function c9980547.initial_effect(c)
e1:SetDescription(aux.Stringid(9980547,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c9980547.atkcon)
e1:SetOperation(c9980547.atkop)
c:RegisterEffect(e1)
......
......@@ -105,7 +105,7 @@ function c9980654.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c9980654.spfilter(c,e,tp)
return c:IsSetCard(0x9bcd) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
return c:IsSetCard(0x9bcd) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP_ATTACK)
end
function c9980654.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -119,7 +119,7 @@ function c9980654.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9980654.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,true,true,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......
......@@ -67,7 +67,10 @@ function c9980661.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local val=g:GetSum(Card.GetRank)*200+g:GetSum(Card.GetLevel)*100+g:GetSum(Card.GetLink)*300
local val1=g:GetSum(Card.GetRank)*200
local val2=g:GetSum(Card.GetLevel)*100
local val3=g:GetSum(Card.GetLink)*300
local val=val1+val2+val3
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -61,10 +61,10 @@ function c9980707.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c9980707.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.GetFirstMatchingCard(c9980707.filter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local g=Duel.GetFirstMatchingCard(c9980707.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c9980707.spcon(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