Commit 49b75064 authored by mercury233's avatar mercury233

fix

parent e6b3e5e9
...@@ -22,6 +22,7 @@ function s.initial_effect(c) ...@@ -22,6 +22,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE) e3:SetRange(LOCATION_HAND+LOCATION_MZONE)
e3:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
e3:SetCondition(s.spcon) e3:SetCondition(s.spcon)
...@@ -56,7 +57,7 @@ end ...@@ -56,7 +57,7 @@ end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x28a) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x28a) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -62,7 +62,7 @@ function s.atkcon(e) ...@@ -62,7 +62,7 @@ function s.atkcon(e)
return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function s.qfilter(e,c) function s.qfilter(e,c)
return c:IsSetCard(0x28a) and c:GetFlagEffect(id)>0 return c:GetFlagEffect(id)>0
end end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0x28a) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x28a) and c:IsType(TYPE_MONSTER)
......
...@@ -65,10 +65,10 @@ end ...@@ -65,10 +65,10 @@ end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE) local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end if ft<=0 then return end
if ft>=4 then ft=4 end
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if ft>=4 then ft=4 end
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft) local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SSet(tp,sg) Duel.SSet(tp,sg)
......
...@@ -9,13 +9,14 @@ function s.initial_effect(c) ...@@ -9,13 +9,14 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.spfilter(c,e,tp,check) function s.spfilter(c,e,tp,check)
return c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (check and c:IsControler(1-tp) or c:IsSetCard(0x28a) and c:IsControler(tp)) and (check and c:IsControler(1-tp) or c:IsSetCard(0x28a) and c:IsControler(tp))
end end
function s.checkfilter(c) function s.checkfilter(c)
......
...@@ -7,6 +7,7 @@ function s.initial_effect(c) ...@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
......
...@@ -18,8 +18,8 @@ function s.initial_effect(c) ...@@ -18,8 +18,8 @@ function s.initial_effect(c)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
...@@ -34,7 +34,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,6 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
return result return result
end end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function s.tdfilter(c) function s.tdfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x28c) and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsAbleToHand() and c:IsSetCard(0x28c) and c:IsType(TYPE_SPELL+TYPE_TRAP)
...@@ -45,24 +44,20 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,24 +44,20 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(p,3) local g=Duel.GetDecktopGroup(p,3)
if not g or #g<3 then return end if not g or #g<3 then return end
g=g:Filter(s.tdfilter,nil) g=g:Filter(s.tdfilter,nil)
local ct=3
if #g>0 and Duel.SelectYesNo(p,aux.Stringid(id,2)) then if #g>0 and Duel.SelectYesNo(p,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:Select(p,1,1,nil) local sg=g:Select(p,1,1,nil)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg) Duel.ConfirmCards(1-p,sg)
Duel.SortDecktop(p,p,3-#sg)
for i=1,3-#sg do
local mg=Duel.GetDecktopGroup(p,1)
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end
Duel.ShuffleHand(p) Duel.ShuffleHand(p)
else ct=ct-1
Duel.SortDecktop(p,p,3) end
for i=1,3 do Duel.SortDecktop(p,p,ct)
local mg=Duel.GetDecktopGroup(p,1) for i=1,ct do
Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM) local mg=Duel.GetDecktopGroup(p,1)
end Duel.MoveSequence(mg:GetFirst(),SEQ_DECKBOTTOM)
end end
end end
function s.sptgexfilter(c,e,tp,code) function s.sptgexfilter(c,e,tp,code)
......
...@@ -54,9 +54,10 @@ function s.gmattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,9 +54,10 @@ function s.gmattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,s.gmattgfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil,c) Duel.SelectTarget(tp,s.gmattgfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil,c)
end end
function s.gmatop(e,tp,eg,ep,ev,re,r,rp) function s.gmatop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetTargetsRelateToChain():Filter(aux.NOT(Card.IsImmuneToEffect),nil,e) local g=Duel.GetTargetsRelateToChain():Filter(aux.NOT(Card.IsImmuneToEffect),nil,e)
if #g>0 then if c:IsRelateToChain() and #g>0 then
Duel.Overlay(e:GetHandler(),g) Duel.Overlay(c,g)
end end
end end
function s.matcon(e,tp,eg,ep,ev,re,r,rp) function s.matcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,8 +18,9 @@ function s.initial_effect(c) ...@@ -18,8 +18,9 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2)) e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(s.damcon) e2:SetCondition(s.damcon)
e2:SetTarget(s.damtg) e2:SetTarget(s.damtg)
...@@ -68,7 +69,8 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +69,8 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.damcon(e) function s.damcon(e)
return e:GetHandler():GetOverlayCount()>=5 local c=e:GetHandler()
return (c==Duel.GetAttacker() or c==Duel.GetAttackTarget()) and c:GetOverlayCount()>=5
end end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -23,7 +23,7 @@ function s.initial_effect(c) ...@@ -23,7 +23,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(s.spcon) e3:SetCondition(s.spcon)
...@@ -35,7 +35,7 @@ function s.initial_effect(c) ...@@ -35,7 +35,7 @@ function s.initial_effect(c)
e4:SetDescription(aux.Stringid(id,1)) e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetTarget(s.mattg) e4:SetTarget(s.mattg)
e4:SetOperation(s.matop) e4:SetOperation(s.matop)
...@@ -87,6 +87,8 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,6 +87,8 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToChain() then if tc:IsRelateToChain() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.matfilter2),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tc) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.matfilter2),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tc)
Duel.Overlay(tc,g) if #g>0 then
Duel.Overlay(tc,g)
end
end end
end end
...@@ -24,7 +24,7 @@ function s.initial_effect(c) ...@@ -24,7 +24,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon2) e3:SetCondition(s.thcon2)
......
...@@ -4,7 +4,7 @@ local s,id,o=GetID() ...@@ -4,7 +4,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_HANDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -39,7 +39,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetValue(s.valcon) e1:SetValue(s.valcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
...@@ -68,11 +68,7 @@ function s.xcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,11 +68,7 @@ function s.xcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsSetCard(0x28c) return c:IsSetCard(0x28c)
end end
function s.check(c) function s.xval(e)
return c:IsCode(id)
end
function s.xval(e,c)
local c=e:GetHandler() local c=e:GetHandler()
local g=c:GetOverlayGroup():Filter(s.check,1,nil) return c:GetOverlayGroup():FilterCount(Card.IsCode,nil,id)
return #g
end end
\ No newline at end of file
...@@ -4,9 +4,8 @@ local s,id,o=GetID() ...@@ -4,9 +4,8 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_DECKDES+CATEGORY_HANDES) e1:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.tg) e1:SetTarget(s.tg)
e1:SetOperation(s.op) e1:SetOperation(s.op)
......
...@@ -4,9 +4,8 @@ local s,id,o=GetID() ...@@ -4,9 +4,8 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_HANDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.tg) e1:SetTarget(s.tg)
e1:SetOperation(s.op) e1:SetOperation(s.op)
......
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