Commit ebb8cf50 authored by wind2009's avatar wind2009
parents 96a365b5 b04e7032
Pipeline #41670 passed with stages
in 2 minutes and 9 seconds
...@@ -29,14 +29,14 @@ function s.initial_effect(c) ...@@ -29,14 +29,14 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetTarget(s.destg) e3:SetTarget(s.destg)
e3:SetOperation(s.desop) e3:SetOperation(s.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCondition(s.descon) e4:SetCondition(s.descon)
e4:SetCode(EVENT_REMOVE) e4:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -99,7 +99,7 @@ function s.limit(c) ...@@ -99,7 +99,7 @@ function s.limit(c)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then if tc:IsRelateToChain() and tc:IsOnField() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -14,8 +14,8 @@ function s.initial_effect(c) ...@@ -14,8 +14,8 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.costfilter(c,e,tp) function s.costfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0 and c:IsFaceupEx()
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_REMOVED,0,1,c,e,tp)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0xef) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsFaceupEx() and c:IsSetCard(0xef) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
......
...@@ -51,6 +51,7 @@ end ...@@ -51,6 +51,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then if e:GetLabel()==1 then
if Duel.Recover(1-tp,1000,REASON_EFFECT)>0 then if Duel.Recover(1-tp,1000,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end end
else else
......
...@@ -56,6 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRankAbove(1) then lv=tc:GetRank() end if tc:IsRankAbove(1) then lv=tc:GetRank() end
if lv~=0 and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,tc,lv) if lv~=0 and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,tc,lv)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_MZONE,0,1,1,tc,lv) local g=Duel.SelectMatchingCard(tp,s.cfilter2,tp,LOCATION_MZONE,0,1,1,tc,lv)
local tc2=g:GetFirst() local tc2=g:GetFirst()
......
...@@ -63,14 +63,14 @@ function s.posfilter(c) ...@@ -63,14 +63,14 @@ function s.posfilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x54) and c:IsCanChangePosition() return c:IsPosition(POS_FACEUP_ATTACK) and c:IsSetCard(0x54) and c:IsCanChangePosition()
end end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk) function s.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
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 c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.posfilter,tp,LOCATION_MZONE,0,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0) if Duel.ChangePosition(g,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
...@@ -82,6 +82,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,6 +82,7 @@ function s.posop(e,tp,eg,ep,ev,re,r,rp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end
end end
function s.etarget(e,c) function s.etarget(e,c)
return c:IsFaceup() and c:IsSetCard(0x54) return c:IsFaceup() and c:IsSetCard(0x54)
......
...@@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ag=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_GRAVE,0,nil) local ag=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_GRAVE,0,nil)
local atk=ag:GetSum(Card.IsAttack) local atk=ag:GetSum(Card.GetAttack)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
...@@ -39,16 +39,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,16 +39,17 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,nil) if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,nil)
and dam>0 and dam>0
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
local hg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,nil) local hg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,nil)
Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(hg,REASON_EFFECT+REASON_DISCARD)
Duel.Damage(1-tp,dam,REASON_EFFECT) Duel.Damage(1-tp,dam,REASON_EFFECT)
end end
end end
end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end
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