Commit 0c33633d authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/ROTA' into master

parents 9d60d885 f77806eb
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(aux.MimighoulFlipCondition)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -42,7 +43,6 @@ function s.spfilter(c,e,tp) ...@@ -42,7 +43,6 @@ function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp) return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
if (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
local tg=Duel.GetDecktopGroup(tp,3) local tg=Duel.GetDecktopGroup(tp,3)
if #tg==0 then return end if #tg==0 then return end
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
...@@ -60,7 +60,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.GetControl(c,1-tp) Duel.GetControl(c,1-tp)
end end
end
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)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -9,7 +9,7 @@ function c31386180.initial_effect(c) ...@@ -9,7 +9,7 @@ function c31386180.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetCondition(c31386180.incon) e1:SetCondition(c31386180.condition)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
...@@ -21,7 +21,6 @@ function c31386180.initial_effect(c) ...@@ -21,7 +21,6 @@ function c31386180.initial_effect(c)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c31386180.descon)
e2:SetTarget(c31386180.destg) e2:SetTarget(c31386180.destg)
e2:SetOperation(c31386180.desop) e2:SetOperation(c31386180.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -36,21 +35,18 @@ function c31386180.initial_effect(c) ...@@ -36,21 +35,18 @@ function c31386180.initial_effect(c)
e3:SetOperation(c31386180.rmop) e3:SetOperation(c31386180.rmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c31386180.incon(e) function c31386180.condition(e)
return e:GetHandler():GetOverlayCount()>0 return e:GetHandler():GetOverlayCount()>0
end end
function c31386180.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0
end
function c31386180.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31386180.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c31386180.desop(e,tp,eg,ep,ev,re,r,rp) function c31386180.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetOverlayCount()==0 then return end if not c31386180.condition(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
...@@ -60,8 +56,7 @@ function c31386180.rmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,8 +56,7 @@ function c31386180.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c31386180.rmop(e,tp,eg,ep,ev,re,r,rp) function c31386180.rmop(e,tp,eg,ep,ev,re,r,rp)
if not c31386180.condition(e) then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:GetOverlayCount()>0 then
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
end end
...@@ -25,7 +25,7 @@ function c50366775.cfilter(c,tc) ...@@ -25,7 +25,7 @@ function c50366775.cfilter(c,tc)
return c:IsType(TYPE_LINK) and not c:IsCode(tc:GetLinkCode()) return c:IsType(TYPE_LINK) and not c:IsCode(tc:GetLinkCode())
end end
function c50366775.target(e,tp,eg,ep,ev,re,r,rp,chk) function c50366775.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50366775.filter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c50366775.cfilter,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
end end
function c50366775.operation(e,tp,eg,ep,ev,re,r,rp) function c50366775.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(aux.MimighoulFlipCondition)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -43,7 +44,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,7 +44,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
if (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
Duel.Draw(1-tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT)
local tg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local tg1=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if tg1:GetCount()>0 then if tg1:GetCount()>0 then
...@@ -58,7 +58,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.GetControl(c,1-tp) Duel.GetControl(c,1-tp)
end end
end
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)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -36,6 +36,7 @@ function s.initial_effect(c) ...@@ -36,6 +36,7 @@ function s.initial_effect(c)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,id+o*2) e3:SetCountLimit(1,id+o*2)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -76,6 +77,9 @@ function s.dsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +77,9 @@ function s.dsop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsSetCard(0x81) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x81) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -90,5 +94,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,5 +94,7 @@ function s.spop(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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,e:GetLabel(),nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,e:GetLabel(),nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
...@@ -22,7 +22,7 @@ function c7672244.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -22,7 +22,7 @@ function c7672244.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c7672244.activate(e,tp,eg,ep,ev,re,r,rp) function c7672244.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,1-tp,PHASE_END,1) Duel.GetControl(tc,1-tp,PHASE_END,1)
end end
end end
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(aux.MimighoulFlipCondition)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -46,7 +47,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,7 +47,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
if (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -54,7 +54,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,6 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.GetControl(c,1-tp) Duel.GetControl(c,1-tp)
end end
end
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)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -1772,3 +1772,7 @@ end ...@@ -1772,3 +1772,7 @@ end
function Auxiliary.DimensionalFissureTarget(e,c) function Auxiliary.DimensionalFissureTarget(e,c)
return c:GetOriginalType()&TYPE_MONSTER>0 and not c:IsLocation(LOCATION_OVERLAY) and not c:IsType(TYPE_SPELL+TYPE_TRAP) return c:GetOriginalType()&TYPE_MONSTER>0 and not c:IsLocation(LOCATION_OVERLAY) and not c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
--
function Auxiliary.MimighoulFlipCondition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsMainPhase()
end
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