Commit 2533b01f authored by wind2009's avatar wind2009

Fix The Toil of the Normal

parent 72f46f23
Pipeline #32510 passed with stages
in 1 minute and 15 seconds
...@@ -51,7 +51,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -51,7 +51,7 @@ function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.posop(e,tp,eg,ep,ev,re,r,rp) function s.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
end end
......
--一色之劳 --The Toil of the Normal
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,id) aux.AddCodeList(c,id)
...@@ -6,7 +6,6 @@ function s.initial_effect(c) ...@@ -6,7 +6,6 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_SPSUMMON+TIMING_SUMMON) e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_SPSUMMON+TIMING_SUMMON)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
...@@ -15,14 +14,14 @@ function s.initial_effect(c) ...@@ -15,14 +14,14 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsType(TYPE_NORMAL) return c:IsAllTypes(TYPE_NORMAL+TYPE_MONSTER)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetCount()>0 and true end if chk==0 then return g:GetCount()>0 end
end end
function s.tdfilter(c) function s.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToDeck() return c:IsFaceup() and c:IsAllTypes(TYPE_EFFECT+TYPE_MONSTER) and c:IsAbleToDeck()
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsCode(id) and c:IsAbleToHand() return c:IsCode(id) and c:IsAbleToHand()
...@@ -45,6 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sg=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local sg=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst() local tc=sg:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -92,8 +92,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,8 +92,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
if op>4 then if op>4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if sg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -101,5 +101,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,5 +101,5 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.atktg(e,c) function s.atktg(e,c)
return c:IsType(TYPE_NORMAL) return c:IsAllTypes(TYPE_NORMAL+TYPE_MONSTER) and c:IsFaceup()
end end
\ No newline at end of file
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