Commit 33aed6fd authored by wind2009's avatar wind2009

Fix ARG☆S-熱闘のパルテ

parent 172f7fc2
--ARGS热斗之帕耳忒
--ARG☆S-熱闘のパルテ
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
......@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
......@@ -35,22 +36,16 @@ function s.initial_effect(c)
e4:SetOperation(s.setop)
c:RegisterEffect(e4)
end
function s.atkval(e,c)
local g=Duel.GetMatchingGroup(s.bfilter,c:GetControler(),LOCATION_MZONE,0,c)
return g:GetClassCount(Card.GetCode)*700
end
function s.bfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1c1)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function s.spfilter(c,tp)
return c:IsSetCard(0x1c1) and c:IsAllTypes(TYPE_CONTINUOUS|TYPE_TRAP) and c:IsFaceup() and c:IsAbleToHand() and Duel.GetMZoneCount(tp,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND)
end
......@@ -58,12 +53,23 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:Filter(Card.IsLocation,nil,LOCATION_HAND)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.atkval(e,c)
local g=Duel.GetMatchingGroup(s.bfilter,c:GetControler(),LOCATION_MZONE,0,c)
return g:GetClassCount(Card.GetCode)*700
end
function s.bfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1c1)
end
function s.setfilter(c)
return c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsSSetable()
return c:IsAllTypes(TYPE_TRAP+TYPE_CONTINUOUS) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_HAND,0,1,nil) end
......@@ -81,4 +87,4 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -81,4 +81,4 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
\ No newline at end of file
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