Commit 88906e13 authored by Tachibana's avatar Tachibana

1145141919810

parent bd2fc58e
Pipeline #14632 passed with stages
in 25 minutes and 52 seconds
...@@ -15,13 +15,12 @@ function s.initial_effect(c) ...@@ -15,13 +15,12 @@ function s.initial_effect(c)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--panish --panish
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.pntg) e2:SetTarget(s.pntg)
e2:SetOperation(s.pnop) e2:SetOperation(s.pnop)
...@@ -82,7 +81,7 @@ function s.pncon(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +81,7 @@ function s.pncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(1-tp,id)>0 return Duel.GetFlagEffect(1-tp,id)>0
end end
function s.filadchk(c) function s.filadchk(c)
return c:IsFaceup() and (c:IsAttackAbove(0) or c:IsDefenseAbove(0)) return c:IsFaceup() and (c:GetAttack()>0 or c:GetDefense()>0)
end end
function s.pntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.pntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return s.filadchk(c) end if chkc then return s.filadchk(c) end
...@@ -99,6 +98,7 @@ function s.pnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,6 +98,7 @@ function s.pnop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE) e2:SetCode(EFFECT_SET_DEFENSE)
...@@ -106,17 +106,30 @@ function s.pnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,17 +106,30 @@ function s.pnop(e,tp,eg,ep,ev,re,r,rp)
end end
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD_P)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetLabelObject(tc) e3:SetLabelObject(tc)
e3:SetOperation(s.pop) e3:SetOperation(s.ppop)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
tc:CreateEffectRelation(e3) tc:CreateEffectRelation(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetLabelObject(e3)
e4:SetOperation(s.pop)
Duel.RegisterEffect(e4,tp)
end end
function s.pop(e,tp,eg,ep,ev,re,r,rp) function s.ppop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(0)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if not eg:IsContains(tc) then return end if not eg:IsContains(tc) then return end
if not tc:IsRelateToEffect(e) or tc:GetReasonPlayer()~=1-tp then e:Reset() return end if not tc:IsRelateToEffect(e) or tc:GetReasonPlayer()~=1-tp then return end
e:SetLabel(1)
end
function s.pop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=1 then return end
e:GetLabelObject():Reset()
e:Reset()
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil) local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
local fg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil) local fg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
local g local g
...@@ -126,7 +139,7 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,7 +139,7 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end end
if g:GetCount()~=0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
......
...@@ -106,12 +106,13 @@ function s.sgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,12 +106,13 @@ function s.sgop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsControler(tp) and Duel.GetMZoneCount(tp)<2 then return if tc:IsControler(tp) and Duel.GetMZoneCount(tp)<2 then return
elseif Duel.GetMZoneCount(tp)<1 or Duel.GetMZoneCount(1-tp)<1 then return elseif Duel.GetMZoneCount(tp)<1 or Duel.GetMZoneCount(1-tp)<1 then return
end end
Debug.Message(1) --Debug.Message(1)
Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc,0,tp,tc:GetControler(),false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tc:GetControler(),false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
...@@ -120,8 +121,8 @@ function s.sgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -120,8 +121,8 @@ function s.sgop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EFFECT_UNRELEASABLE_SUM) e5:SetCode(EFFECT_UNRELEASABLE_SUM)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD) e5:SetReset(RESET_EVENT+RESETS_STANDARD)
e5:SetValue(1) e5:SetValue(1)
tc:RegisterEffect(e5) tc:RegisterEffect(e5)
......
...@@ -97,7 +97,8 @@ function s.spcs(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -97,7 +97,8 @@ function s.spcs(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
end end
function s.filov(c,e) function s.filov(c,e)
return c:IsFaceup() and c:IsAttack(0) and not c:IsImmuneToEffect(e) and c:IsCanOverlay(e:GetHandlerPlayer()) return c:IsFaceup() and c:IsAttack(0) and not c:IsImmuneToEffect(e)
and c:IsCanOverlay(e:GetHandlerPlayer())
end end
function s.filcs(c) function s.filcs(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToDeckOrExtraAsCost() return c:IsRace(RACE_PLANT) and c:IsAbleToDeckOrExtraAsCost()
...@@ -113,15 +114,13 @@ function s.filcg(g,og,tp) ...@@ -113,15 +114,13 @@ function s.filcg(g,og,tp)
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)
if chk==0 then if chk==0 then
Debug.Message(e:GetLabel())
if e:GetLabel()~=66 then return false end if e:GetLabel()~=66 then return false end
e:SetLabel(0) e:SetLabel(0)
local og=Duel.GetMatchingGroup(s.filov,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,e) local og=Duel.GetMatchingGroup(s.filov,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
local cg=Duel.GetMatchingGroup(s.filcs,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler()) local cg=Duel.GetMatchingGroup(s.filcs,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
Debug.Message(cg:CheckSubGroup(s.filcg,2,2,og,tp))
return cg:CheckSubGroup(s.filcg,2,2,og,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) return cg:CheckSubGroup(s.filcg,2,2,og,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
local aog=Duel.GetMatchingGroup(s.filov,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,e) local aog=Duel.GetMatchingGroup(s.filov,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
local acg=Duel.GetMatchingGroup(s.filcs,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler()) local acg=Duel.GetMatchingGroup(s.filcs,tp,LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local cg=acg:SelectSubGroup(tp,s.filcg,false,2,2,aog,tp) local cg=acg:SelectSubGroup(tp,s.filcg,false,2,2,aog,tp)
...@@ -132,11 +131,15 @@ end ...@@ -132,11 +131,15 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
local og=Duel.GetMatchingGroup(s.filov,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp,e) local og=Duel.GetMatchingGroup(s.filov,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
if #og<1 then return end if #og<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sog=og:FilterSelect(tp,s.filovp,1,1,nil,nil,tp) local sog=og:FilterSelect(tp,s.filovp,1,1,nil,nil,tp)
if #sog<1 or sog:GetFirst():IsImmuneToEffect(e) then return end if #sog<1 or sog:GetFirst():IsImmuneToEffect(e) then return end
local mg=sog:GetFirst():GetOverlayGroup()
if mg:GetCount()>0 then
Duel.Overlay(c,mg)
end
Duel.Overlay(c,sog) Duel.Overlay(c,sog)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -20,7 +20,7 @@ function s.initial_effect(c) ...@@ -20,7 +20,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCondition(s.adcon) e3:SetCondition(s.adcon)
e3:SetTarget(s.adtg) e3:SetTarget(s.adtg)
...@@ -91,7 +91,7 @@ function s.achcon(e) ...@@ -91,7 +91,7 @@ function s.achcon(e)
end end
-- --
function s.adcon(e,tp,eg,ep,ev,re,r,rp) function s.adcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp return rp==1-tp
end end
function s.filtog(c) function s.filtog(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x42d0) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x42d0)
...@@ -118,7 +118,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp) ...@@ -118,7 +118,7 @@ function s.adop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()~=1 then return end if e:GetLabel()~=1 then return end
e:SetLabel(0) e:SetLabel(0)
local mg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil,tp,POS_FACEDOWN) local mg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if #mg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if #mg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=mg:Select(tp,1,1,nil) local sg=mg:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
......
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