Commit 80a4e2b2 authored by Nemo Ma's avatar Nemo Ma

fix

parent e471be6f
......@@ -57,7 +57,7 @@ function cm.mat_filter(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.filter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x6978)
return c:IsControler(tp) and c:IsSetCard(0x6978) and c:IsFaceup()
end
function cm.check(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
......
......@@ -18,6 +18,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET)
......@@ -44,20 +45,20 @@ end
function cm.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=e:GetLabel()
if ct>=1 then
if ct==1 then
e:SetCategory(CATEGORY_HANDES)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
if ct>=3 then
if ct==3 then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
e:SetCategory(CATEGORY_HANDES+CATEGORY_SPECIAL_SUMMON)
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
end
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
if ct>=1 then
if ct==1 then
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
local dg=Duel.GetOperatedGroup()
......@@ -71,7 +72,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
end
if ct>=2 then
if ct==2 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_CONFIRM)
......@@ -79,7 +80,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
if ct>=3 then
if ct==3 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if #g>0 then
local sg=g:Select(tp,1,1,nil)
......@@ -99,7 +100,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.tgfilter(c)
return c:IsSetCard(0x132) and c:IsFaceup()
return c:IsSetCard(0x132) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.tgfilter,1,nil)
......
--查拉图斯特喵如是说
--also sprach zarathusnya
--21.12.25
local m=11451652
local cm=_G["c"..m]
......@@ -27,7 +27,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local t=debug.getregistry()
--[[local t=debug.getregistry()
for _,v in pairs(t) do
if aux.GetValueType(v)=="Effect" and v:GetHandler():IsOriginalCodeRule(ac) and v:GetType()&EFFECT_TYPE_IGNITION>0 and v:GetHandler():GetOriginalType()&TYPE_MONSTER>0 then
v:SetType(EFFECT_TYPE_QUICK_O)
......@@ -37,5 +37,24 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
pro=pro|EFFECT_FLAG_CANNOT_INACTIVATE
v:SetProperty(pro,pro2)
end
end--]]
local g=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0xff,0xff,nil,ac)
local reg=Card.RegisterEffect
Card.RegisterEffect=function(sc,se,bool)
if se:GetType()&EFFECT_TYPE_IGNITION>0 and sc:GetOriginalType()&TYPE_MONSTER>0 then
se:SetType(EFFECT_TYPE_QUICK_O)
se:SetCode(EVENT_FREE_CHAIN)
local pro,pro2=se:GetProperty()
pro=pro|EFFECT_FLAG_CANNOT_DISABLE
pro=pro|EFFECT_FLAG_CANNOT_INACTIVATE
se:SetProperty(pro,pro2)
end
reg(sc,se,bool)
end
for tc in aux.Next(g) do
if tc.initial_effect then
tc:ReplaceEffect(tc:GetOriginalCode(),0)
end
end
Card.RegisterEffect=reg
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