Commit 21779ce6 authored by mercury233's avatar mercury233

fix 晴天気ベンガーラ

parent 2e9f64eb
...@@ -30,24 +30,25 @@ function c54895237.initial_effect(c) ...@@ -30,24 +30,25 @@ function c54895237.initial_effect(c)
e3:SetLabelObject(e2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c54895237.gspcfilter(c,tp) function c54895237.costfilter(c,tp,sft)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c54895237.gspfilter,tp,LOCATION_HAND,0,1,nil,c,tp) and Duel.GetMZoneCount(tp,c)>0 and (sft>0 or c:IsLocation(LOCATION_SZONE) and sft>-1)
and Duel.IsExistingMatchingCard(c54895237.setfilter,tp,LOCATION_HAND,0,1,nil,c,tp)
end end
function c54895237.gspfilter(c,cc,tp) function c54895237.setfilter(c,cc,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109) return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109)
and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc)
end end
function c54895237.gspcost(e,tp,eg,ep,ev,re,r,rp,chk) function c54895237.gspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c54895237.gspcfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end local sft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c54895237.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp,sft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c54895237.gspcfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c54895237.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp,sft)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c54895237.gsptg(e,tp,eg,ep,ev,re,r,rp,chk) function c54895237.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_SZONE)>-1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
...@@ -57,7 +58,7 @@ function c54895237.gspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +58,7 @@ function c54895237.gspop(e,tp,eg,ep,ev,re,r,rp)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c54895237.gspfilter,tp,LOCATION_HAND,0,1,1,nil,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c54895237.setfilter,tp,LOCATION_HAND,0,1,1,nil,nil,tp):GetFirst()
if tc then if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end 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