Commit db29e496 authored by Huangnan's avatar Huangnan

Fix format

parent a80e53d5
......@@ -60,9 +60,7 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,check)
end
if check then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
else Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -48,7 +48,7 @@ function s.initial_effect(c)
end
function s.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function s.reccon(e,tp,eg,ep,ev,re,r,rp)
local dg=eg:Filter(s.cfilter,nil,tp)
......@@ -68,7 +68,7 @@ function s.recop(e,tp,eg,ep,ev,re,r,rp)
end
function s.aufilter(c,tp,e)
return c:IsFaceup() and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_GRAVE)
and c:IsLocation(LOCATION_MZONE) and (not e or c:IsCanBeEffectTarget(e))
and c:IsLocation(LOCATION_MZONE) and (not e or c:IsCanBeEffectTarget(e))
end
function s.autg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(s.aufilter,nil,tp,e)
......@@ -76,7 +76,7 @@ function s.autg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return #g>0 end
local tg=g:Clone()
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
tg=g:Select(tp,1,1,nil)
end
Duel.SetTargetCard(tg)
......@@ -95,7 +95,7 @@ function s.auop(e,tp,eg,ep,ev,re,r,rp)
end
function s.thfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_HAND) and c:IsReason(REASON_DISCARD)
and c:IsPreviousLocation(LOCATION_HAND) and c:IsReason(REASON_DISCARD)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(s.thfilter,nil,tp)>0
......
......@@ -14,9 +14,9 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--Activate without draw
local e2=e1:Clone()
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e2:SetCondition(s.dcon)
e2:SetTarget(s.dtarget)
e2:SetTarget(s.dtarget)
e2:SetOperation(s.dactivate)
c:RegisterEffect(e2)
end
......@@ -31,7 +31,7 @@ function s.ndcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.dcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.mfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.filter(c)
return aux.IsCodeListed(c,101204051) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......@@ -65,6 +65,7 @@ function s.dactivate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local ct1=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ct2=6-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
......
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