Commit 599f89d3 authored by POLYMER's avatar POLYMER

fix

parent 0bd0ed07
--绛胧烈刃能态激发
local m=11451717
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -49,6 +48,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(cm.retop3)
Duel.RegisterEffect(e1,0)
Duel.RaiseEvent(tc,m,e,0,0,0,0)
e1:Reset()
end
end
function cm.retop3(e,tp,eg,ep,ev,re,r,rp)
......@@ -73,7 +73,10 @@ end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,c)
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -9,6 +9,9 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_DECK)
e1:SetValue(0xc976)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetValue(0xc977)
c:RegisterEffect(e4)
--cannot special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -34,8 +34,8 @@ function cm.initial_effect(c)
end
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451961)>0 end,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451962)>0 end,nil)
for tc in aux.Next(g1) do tc:ResetFlagEffect(11451961) end
for tc in aux.Next(g2) do tc:ResetFlagEffect(11451962) end
end
......
......@@ -32,10 +32,20 @@ function cm.initial_effect(c)
ge2:SetOperation(cm.evop)
Duel.RegisterEffect(ge2,0)
end
if not PNFL_IMMUNE_CHECK then
PNFL_IMMUNE_CHECK=true
local _IsImmuneToEffect=Card.IsImmuneToEffect
function Card.IsImmuneToEffect(c,e,...)
c:RegisterFlagEffect(11451965,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local res=_IsImmuneToEffect(c,e,...)
c:ResetFlagEffect(11451965)
return res
end
end
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451961)>0 end,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451962)>0 end,nil)
for tc in aux.Next(g1) do tc:ResetFlagEffect(11451961) end
for tc in aux.Next(g2) do tc:ResetFlagEffect(11451962) end
end
......@@ -131,11 +141,13 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g>0 then
--Duel.HintSelection(g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
--e1:SetCondition(cm.recon)
e1:SetValue(cm.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
g:GetFirst():RegisterEffect(e1,true)
......@@ -148,6 +160,7 @@ function cm.efilter(e,te)
if e:GetHandler():GetFlagEffect(m+0xffffff)>0 and te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) and (te:GetCode()<0x10000 or te:IsHasType(EFFECT_TYPE_ACTIONS)) and te:GetCode()~=16 and te:GetCode()~=359 then
if KOISHI_CHECK then
Duel.DisableActionCheck(true)
pcall(Duel.HintSelection,Group.FromCards(e:GetHandler()))
local tc=te:GetHandler()
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -155,6 +168,7 @@ function cm.efilter(e,te)
e1:SetOperation(function() pcall(Duel.Draw,te:GetHandlerPlayer(),1,REASON_EFFECT) e1:Reset() end)
Duel.RegisterEffect(e1,0)
pcall(Duel.RaiseEvent,tc,m,e,0,0,0,0)
e1:Reset()
Duel.DisableActionCheck(false)
else
local e5=Effect.CreateEffect(te:GetHandler())
......@@ -166,8 +180,13 @@ function cm.efilter(e,te)
e5:SetOperation(cm.acop)
Duel.RegisterEffect(e5,tp)
end
if e:GetHandler():GetFlagEffect(11451965)>0 then
e:SetLabelObject(te)
e:SetLabel(Duel.GetCurrentChain())
e:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN)
end
e:GetHandler():ResetFlagEffect(m+0xffffff)
e:SetValue(aux.FALSE)
e:SetValue(function(e,te) return e:GetLabelObject() and te==e:GetLabelObject() and e:GetLabel()==Duel.GetCurrentChain() end)
e:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e:SetDescription(0)
return true
......
......@@ -33,8 +33,8 @@ function cm.initial_effect(c)
end
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451961)>0 end,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451962)>0 end,nil)
for tc in aux.Next(g1) do tc:ResetFlagEffect(11451961) end
for tc in aux.Next(g2) do tc:ResetFlagEffect(11451962) end
end
......
......@@ -34,8 +34,8 @@ function cm.initial_effect(c)
end
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)
local g1=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451961)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451961)>0 end,nil)
local g2=Duel.GetMatchingGroup(function(c) return c:IsFacedown() and c:GetFlagEffect(11451962)>0 end,0,0xff,0xff,nil)+Duel.GetOverlayGroup(0,1,1):Filter(function(c) return c:GetFlagEffect(11451962)>0 end,nil)
for tc in aux.Next(g1) do tc:ResetFlagEffect(11451961) end
for tc in aux.Next(g2) do tc:ResetFlagEffect(11451962) end
end
......
......@@ -40,7 +40,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ct=sg:FilterCount(Card.IsOnField,nil)+1
for i=1,math.min(ct,4) do
if i>1 then Duel.BreakEffect() end
local tc=sg:RandomSelect(tp,1):GetFirst()
local tg=sg
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then tg=sg:Filter(Card.IsOnField,nil) end
if #tg<=0 then break end
local tc=tg:RandomSelect(tp,1):GetFirst()
if not tc:IsOnField() then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
else
......
......@@ -17,7 +17,7 @@ function c22020090.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetCondition(c22020090.spcon)
c:RegisterEffect(e1)
--counter
......
......@@ -53,9 +53,9 @@ end
function c22348442.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22348442.eqfilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c22348442.eqfilter,tp,0x14,0x14,1,nil,tp) end
and Duel.IsExistingTarget(c22348442.eqfilter,tp,0x14,0x14,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c22348442.eqfilter,tp,0x14,0x14,1,1,nil,tp)
local g=Duel.SelectTarget(tp,c22348442.eqfilter,tp,0x14,0x14,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c22348442.eqlimit(e,c)
......
......@@ -72,6 +72,6 @@ function c44401007.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:FilterSelect(tp,Card.IsFaceup,1,1,nil)
Duel.HintSelection(dg)
Duel.Destroy(g,REASON_EFFECT)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--無声なサイコフィールド
function c49811205.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c49811205.activate)
c:RegisterEffect(e1)
--To hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811205,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(2,49811205)
e2:SetCondition(c49811205.thcon)
e2:SetTarget(c49811205.thtg)
e2:SetOperation(c49811205.thop)
c:RegisterEffect(e2)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c49811205.activate)
c:RegisterEffect(e1)
--To hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811205,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(2,49811205)
e2:SetCondition(c49811205.thcon)
e2:SetTarget(c49811205.thtg)
e2:SetOperation(c49811205.thop)
c:RegisterEffect(e2)
end
function c49811205.tgfilter(c)
return c:IsType(TYPE_TUNER) and c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToGrave()
return c:IsType(TYPE_TUNER) and c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToGrave()
end
function c49811205.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c49811205.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(49811205,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(c49811205.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(49811205,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function c49811205.cfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO)
end
function c49811205.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811205.cfilter,1,nil)
return eg:IsExists(c49811205.cfilter,1,nil)
end
function c49811205.thfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() and not c:IsType(TYPE_TUNER)
return c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand() and not c:IsType(TYPE_TUNER)
end
function c49811205.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49811205.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
if chk==0 then return Duel.IsExistingMatchingCard(c49811205.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
end
function c49811205.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_PSYCHO)
return c:IsSummonable(true,nil) and c:IsRace(RACE_PSYCHO)
end
function c49811205.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c49811205.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c49811205.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(49811205,2)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c49811205.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c49811205.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c49811205.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(49811205,2)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c49811205.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
\ No newline at end of file
......@@ -89,15 +89,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=e:GetLabelObject()
local tc=rg:GetFirst()
local rg=e:GetLabelObject()
Duel.ConfirmCards(1-tp,rg)
local tc=rg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(66)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetDescription(66)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=rg:GetNext()
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