Commit dd71faf0 authored by POLYMER's avatar POLYMER

fix

parent ca0a8305
No preview for this file type
......@@ -155,7 +155,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0xff,1,nil) then g:AddCard(tc) end --not PNFL_MIRROR_ACTIVATED[tp][ccode] and
end
end
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
if #g>0 and Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
......
......@@ -154,7 +154,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0xff,1,nil) then g:AddCard(tc) end --not PNFL_MIRROR_ACTIVATED[tp][ccode] and
end
end
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
if #g>0 and Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
......
......@@ -163,7 +163,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0xff,1,nil) then g:AddCard(tc) end --not PNFL_MIRROR_ACTIVATED[tp][ccode] and
end
end
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
if #g>0 and Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
......
......@@ -150,7 +150,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0xff,1,nil) then g:AddCard(tc) end --not PNFL_MIRROR_ACTIVATED[tp][ccode] and
end
end
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
if #g>0 and Duel.IsExistingMatchingCard(cm.mfilter,tp,0xff,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11451031,0)) then
local tg=g:Filter(function(c) return c:IsFacedown() and c:IsControler(1-tp) end,nil)
Duel.ConfirmCards(tp,tg)
Duel.Hint(HINT_SELECTMSG,0,aux.Stringid(11451031,4))
......
......@@ -33,7 +33,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.tg(e,c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
local phase=Duel.GetCurrentPhase()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and not ((phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or c:IsStatus(STATUS_BATTLE_DESTROYED)) --and c:IsStatus(STATUS_SPSUMMON_TURN)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
......
......@@ -71,7 +71,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or 1==1) and (c:IsSummonable(true,nil) or (c:IsAbleToHand() and c:IsLocation(LOCATION_MZONE))) end
if chk==0 then return (not c:IsLocation(LOCATION_HAND) or c:IsCanBeSpecialSummoned(e,0,tp,false,false) or 1==1) and (c:IsSummonable(true,nil) or (c:IsAbleToHand() and c:IsLocation(LOCATION_MZONE))) end
if c:IsLocation(LOCATION_HAND) then
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
elseif c:IsLocation(LOCATION_MZONE) then
......
......@@ -43,7 +43,7 @@ function cm.spfilter0(c,loc)
return c:IsPreviousLocation(loc) and not (c:IsLocation(loc) and c:IsControler(c:GetPreviousControler()))
end
function cm.pspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter0,1,nil,LOCATION_DECK) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
return eg:IsExists(cm.spfilter0,1,nil,LOCATION_DECK) --and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -93,16 +93,13 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if chk==0 then
if Duel.GetFlagEffect(tp,m)==0 then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,5))
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
end
if c:IsLocation(LOCATION_EXTRA) and c:GetFlagEffect(m)>0 then return false end
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 then loc=loc+LOCATION_HAND end
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)>-1 then loc=loc+LOCATION_EXTRA end
if (c:IsLocation(LOCATION_EXTRA) and c:GetFlagEffect(m)>0) or loc==0 or not c:IsLocation(loc) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) then return false end
if loc==0 or not c:IsLocation(loc) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) then return false end
local lock1=(c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)==0) or (c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)==0)
local lock2=false
if rpz==nil and lpz==nil then
......
......@@ -51,7 +51,7 @@ function c21194002.r(c,tp)
end
function c21194002.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c21194002.r,tp,12,12,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,4)>0 end
if chk==0 then return Duel.IsExistingTarget(c21194002.r,tp,12,12,1,nil,tp) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(3,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,12,12,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
......@@ -26,12 +26,27 @@ function c33700912.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT)
end
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
if Duel.GetCurrentPhase()~=PHASE_END then
if Duel.GetCurrentPhase()==PHASE_DRAW then
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_DRAW,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
elseif Duel.GetCurrentPhase()==PHASE_STANDBY then
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_STANDBY,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
elseif Duel.GetCurrentPhase()==PHASE_MAIN1 then
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
elseif Duel.GetCurrentPhase()==PHASE_BATTLE then
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
elseif Duel.GetCurrentPhase()==PHASE_MAIN2 then
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
end
end
\ No newline at end of file
--于狂暴轮回中守望
function c67200621.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c67200621.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200621,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,67200621)
e3:SetTarget(c67200621.target)
e3:SetOperation(c67200621.operation)
c:RegisterEffect(e3)
end
function c67200621.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP)
end
function c67200621.handcon(e)
return Duel.IsExistingMatchingCard(c67200621.filter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
--
function c67200621.costfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c67200621.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c67200621.costfilter,tp,LOCATION_HAND,0,1,c)
and Duel.IsExistingMatchingCard(c67200621.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c67200621.costfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c67200621.costfilter,tp,LOCATION_HAND,0,c)
local g2=Duel.GetMatchingGroup(c67200621.costfilter,tp,LOCATION_DECK,0,nil)
if b1 then
g:Merge(g1)
end
if b2 then
g:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_HAND) then
e:SetLabel(1)
e:SetCategory((CATEGORY_TOHAND+CATEGORY_SEARCH))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
if tc:IsLocation(LOCATION_DECK) then
e:SetLabel(2)
e:SetCategory(0)
end
Duel.SendtoGrave(tc,REASON_COST)
end
function c67200621.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local label=e:GetLabel()
if label==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200621.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
if label==2 then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCondition(c67200621.thcon)
e4:SetOperation(c67200621.thop)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
function c67200621.thfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP)
end
function c67200621.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c67200621.thfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c67200621.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,67200621)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200621.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--陷入狂暴轮回
function c67200622.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c67200622.handcon)
c:RegisterEffect(e0)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200622,1))
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,67200622+EFFECT_COUNT_CODE_OATH)
e3:SetTarget(c67200622.target)
e3:SetOperation(c67200622.operation)
c:RegisterEffect(e3)
end
function c67200622.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP)
end
function c67200622.handcon(e)
return Duel.IsExistingMatchingCard(c67200622.filter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
--
function c67200622.costfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost()
end
function c67200622.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c67200622.costfilter,tp,LOCATION_HAND,0,1,c) and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 and Duel.IsExistingMatchingCard(c67200622.thfilter,tp,LOCATION_GRAVE,0,2,nil)
local b2=Duel.IsExistingMatchingCard(c67200622.costfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c67200622.costfilter,tp,LOCATION_HAND,0,c)
local g2=Duel.GetMatchingGroup(c67200622.costfilter,tp,LOCATION_DECK,0,nil)
if b1 then
g:Merge(g1)
end
if b2 then
g:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_HAND) then
e:SetLabel(1)
e:SetCategory(0)
end
if tc:IsLocation(LOCATION_DECK) then
e:SetLabel(2)
e:SetCategory(0)
end
Duel.SendtoGrave(tc,REASON_COST)
end
function c67200622.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local label=e:GetLabel()
if label==1 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200622.thfilter),tp,LOCATION_GRAVE,0,2,2,nil)
if #g==2 then
Duel.SSet(tp,g)
end
end
if label==2 then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCondition(c67200622.thcon)
e4:SetOperation(c67200622.thop)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
function c67200622.thfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c67200622.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_SZONE)>1 and Duel.IsExistingMatchingCard(c67200622.thfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c67200622.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,67200622)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c67200622.thfilter),tp,LOCATION_GRAVE,0,2,2,nil)
if g:GetCount()==2 then
Duel.SSet(tp,g)
end
end
--凶兽于狂暴轮回中
function c67200623.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c67200623.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200623,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,67200623)
e3:SetTarget(c67200623.target)
e3:SetOperation(c67200623.operation)
c:RegisterEffect(e3)
end
function c67200623.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP)
end
function c67200623.handcon(e)
return Duel.IsExistingMatchingCard(c67200623.filter1,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
--
function c67200623.costfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost() and c:IsFaceupEx()
end
function c67200623.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c67200623.costfilter,tp,LOCATION_HAND,0,1,c)
local b2=Duel.IsExistingMatchingCard(c67200623.costfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return b1 or b2 end
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c67200623.costfilter,tp,LOCATION_HAND,0,c)
local g2=Duel.GetMatchingGroup(c67200623.costfilter,tp,LOCATION_ONFIELD,0,nil)
if b1 then
g:Merge(g1)
end
if b2 then
g:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_HAND) then
e:SetLabel(1)
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
if tc:IsLocation(LOCATION_ONFIELD) then
e:SetLabel(2)
e:SetCategory(0)
end
Duel.SendtoGrave(tc,REASON_COST)
end
function c67200623.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local label=e:GetLabel()
if label==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
if label==2 then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCondition(c67200623.thcon)
e4:SetOperation(c67200623.thop)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
function c67200623.thfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP)
end
function c67200623.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
end
function c67200623.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,67200623)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--狂暴轮回干涉
function c67200624.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,67200624+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c67200624.condition)
e1:SetTarget(c67200624.target)
e1:SetOperation(c67200624.operation)
c:RegisterEffect(e1)
end
function c67200624.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c67200624.costfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToHandAsCost() and c:IsFaceupEx()
end
function c67200624.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c67200624.costfilter,tp,LOCATION_ONFIELD,0,1,c) and Duel.IsChainNegatable(ev)
local b2=Duel.IsExistingMatchingCard(c67200624.costfilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c67200624.costfilter,tp,LOCATION_ONFIELD,0,c)
local g2=Duel.GetMatchingGroup(c67200624.costfilter,tp,LOCATION_GRAVE,0,nil)
if b1 then
g:Merge(g1)
end
if b2 then
g:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_ONFIELD) then
e:SetLabel(1)
e:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
end
if tc:IsLocation(LOCATION_GRAVE) then
e:SetLabel(2)
e:SetCategory(0)
end
Duel.SendtoHand(tc,nil,REASON_COST)
end
function c67200624.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--if not c:IsRelateToEffect(e) then return end
local label=e:GetLabel()
if label==1 then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
if label==2 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200624,5))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetOperation(c67200624.disop)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c67200624.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if ep==tp then return end
if Duel.GetFlagEffect(tp,67200624)==0 and Duel.SelectYesNo(tp,aux.Stringid(67200624,3)) then
Duel.RegisterFlagEffect(tp,67200624,RESET_PHASE+PHASE_END,0,1)
if Duel.NegateEffect(ev,true) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
end
end
--黄泉之歌
function c67200625.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetRange(LOCATION_SZONE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(1,67200625)
--e5:SetCondition(c67200625.tscon)
e5:SetTarget(c67200625.tgtg)
e5:SetOperation(c67200625.tgop)
c:RegisterEffect(e5)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c67200625.handcon)
c:RegisterEffect(e2)
end
--
function c67200625.costfilter(c)
return c:IsSetCard(0x567b) and c:GetType()==TYPE_TRAP and c:IsAbleToHandAsCost() and c:IsFaceupEx()
end
function c67200625.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(c67200625.costfilter,tp,LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
local b2=Duel.IsExistingMatchingCard(c67200625.costfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
if chk==0 then return b1 or b2 end
local g=Group.CreateGroup()
local g1=Duel.GetMatchingGroup(c67200625.costfilter,tp,LOCATION_ONFIELD,0,c)
local g2=Duel.GetMatchingGroup(c67200625.costfilter,tp,LOCATION_GRAVE,0,nil)
if b1 then
g:Merge(g1)
end
if b2 then
g:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsLocation(LOCATION_ONFIELD) then
e:SetLabel(1)
e:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
end
if tc:IsLocation(LOCATION_GRAVE) then
e:SetLabel(2)
e:SetCategory(0)
end
Duel.SendtoHand(tc,nil,REASON_COST)
end
function c67200625.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--if not c:IsRelateToEffect(e) then return end
local label=e:GetLabel()
if label==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if label==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local gg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
if gg:GetCount()>0 then
Duel.Remove(gg,POS_FACEUP,REASON_EFFECT)
end
end
end
--
function c67200625.handcon(e)
local tp=e:GetHandler():GetControler()
return Duel.GetTurnPlayer()==tp
end
\ No newline at end of file
--黄泉之宴
function c67200626.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,67200626)
e5:SetTarget(c67200626.tgtg)
e5:SetOperation(c67200626.tgop)
c:RegisterEffect(e5)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c67200626.handcon)
c:RegisterEffect(e2)
end
function c67200626.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c67200626.setfilter(c)
return c:IsSetCard(0x567b) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)
end
function c67200626.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local gg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if gg:GetCount()>0 then
Duel.HintSelection(gg)
Duel.SendtoGrave(gg,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c67200626.setfilter,tp,LOCATION_DECK,0,nil)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and g:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(67200626,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:Select(tp,1,1,nil)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
--
function c67200626.handcon(e)
local tp=e:GetHandler():GetControler()
return Duel.GetTurnPlayer()==tp
end
......@@ -3,7 +3,7 @@ if not c71400001 then dofile("expansions/script/c71400001.lua") end
function c71400043.initial_effect(c)
c:SetSPSummonOnce(71400043)
--link summon
aux.AddLinkProcedure(c,c71400043.matfilter,1,1,yume.YumeCheck(c))
aux.AddLinkProcedure(c,c71400043.matfilter,1,1,c71400043.mgfilterfunc(c))
c:EnableReviveLimit()
--summon limit
local el1=Effect.CreateEffect(c)
......@@ -63,6 +63,10 @@ end
function c71400043.matfilter(c)
return c:IsSetCard(0x714) and not c:IsLinkType(TYPE_LINK)
end
function c71400043.mgfilterfunc(c)
local sp=c:GetControler()
return function(g) return yume.IsYumeFieldOnField(sp) and Duel.IsExistingMatchingCard(c71400043.gyfilter,sp,LOCATION_GRAVE,0,1,nil) end
end
function c71400043.gyfilter(c)
return c:IsSetCard(0x7714) and c:IsType(TYPE_FIELD)
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