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