Commit b2e2467f authored by 花桃白音's avatar 花桃白音

fix 42s yuukofox effect triggertype,select target,cdb description

parent 043dc0aa
No preview for this file type
...@@ -13,8 +13,7 @@ function cm.initial_effect(c) ...@@ -13,8 +13,7 @@ function cm.initial_effect(c)
.Return()).c("RegisterEffect",iFunc(c) .Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,1)) .e("SetDescription",aux.Stringid(m,1))
.e("SetCategory",CATEGORY_SPECIAL_SUMMON) .e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) .e("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
.e("SetProperty",EFFECT_FLAG_DAMAGE_STEP)
.e("SetCode",EVENT_TO_GRAVE) .e("SetCode",EVENT_TO_GRAVE)
.e("SetTarget",cm.target) .e("SetTarget",cm.target)
.e("SetOperation",cm.operation) .e("SetOperation",cm.operation)
......
...@@ -21,21 +21,24 @@ function c4270009.initial_effect(c) ...@@ -21,21 +21,24 @@ function c4270009.initial_effect(c)
e2:SetOperation(c4270009.operation2) e2:SetOperation(c4270009.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c4270009.filter(c,tp) function c4270009.filter(c)
return c:IsSetCard(0xa28) and c:IsAbleToRemove() return c:IsAbleToRemove()
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,c)
end end
function c4270009.filter1(c,e,tp) function c4270009.filter1(c,e,tp)
return c:IsSetCard(0xa28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return c:IsSetCard(0xa28) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function c4270009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4270009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return chkc:IsLocation(LOCATION_GRAVE)
and c4270009.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4270009.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(c4270009.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c4270009.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp) local g = Duel.SelectMatchingCard(tp,c4270009.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,g) if Duel.SelectYesNo(tp,aux.Stringid(4270009,2)) then
g:Merge(g2) local g2=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove(),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,g)
g:Merge(g2)
end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,3,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,3,0,0)
end end
function c4270009.operation(e,tp,eg,ep,ev,re,r,rp) function c4270009.operation(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