Commit b7c18f4a authored by POLYMER's avatar POLYMER

fix

parent a36aecf6
-- 后悔
local s,id,o=GetID()
local s,id=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_INACTIVATE)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EFFECT_CANNOT_DISEFFECT)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(s.oppcon)
e3:SetOperation(s.oppop)
c:RegisterEffect(e3)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e2:SetCondition(s.oppcon)
e2:SetTarget(s.opptg)
e2:SetOperation(s.oppop)
c:RegisterEffect(e2)
end
function s.filter(c,tp)
return c:IsAbleToHand() and Duel.IsExistingMatchingCard(s.namefilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,c:GetCode())
end
......@@ -72,6 +67,7 @@ function s.endop(e,tp,eg,ep,ev,re,r,rp)
local target_num = count * 3
local field_count = Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
local actual_return = math.min(target_num, field_count)
if actual_return > 0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,actual_return,actual_return,nil)
......@@ -83,6 +79,10 @@ end
function s.oppcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.opptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,1-tp,LOCATION_DECK)
end
function s.oppop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(1-tp, aux.Stringid(id,2)) then
s.thop(e,1-tp,eg,ep,ev,re,r,rp)
......
......@@ -29,6 +29,7 @@ function c28318606.initial_effect(c)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
ge1:SetCountLimit(1)
ge1:SetOperation(c28318606.checkop)
Duel.RegisterEffect(ge1,0)
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