Commit 24bce3b7 authored by Nemo Ma's avatar Nemo Ma

fix

parent 0a8f1ef7
--烬羽的残迹·珍妮丽丝
local m=11451745
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--link summon
c:EnableReviveLimit()
......@@ -29,12 +28,25 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
for i=1,Duel.GetCurrentChain() do
local tgp,te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_EFFECT)
if tgp~=tp then
Duel.ChangeChainOperation(i,cm.repop(te:GetOperation()))
te:SetOperation(cm.repop(te:GetOperation()))
--[[local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetOperation(cm.ngop)
e1:SetReset(RESET_CHAIN)
e1:SetLabel(i)
Duel.RegisterEffect(e1,tp)--]]
end
end
end
function cm.ngop(e,tp,eg,ep,ev,re,r,rp)
if ev==e:GetLabel() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then
Duel.ChangeChainOperation(0,cm.repop(re:GetOperation()))
end
end
function cm.repop(_op)
return function(e,tp,eg,ep,ev,re,r,rp)
e:SetOperation(_op)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) then return end
_op(e,tp,eg,ep,ev,re,r,rp)
end
......
......@@ -100,6 +100,11 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge2,0)
end
end
local _IsActiveType=Effect.IsActiveType
local _GetActiveType=Effect.GetActiveType
local _IsType=Card.IsType
local _GetType=Card.GetType
local _GetOriginalType=Card.GetOriginalType
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
......@@ -121,6 +126,32 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if not KOISHI_CHECK then
Duel.Hint(HINT_CARD,0,code_list[val])
else
function Effect.GetActiveType(se)
if se==te then
return TYPE_MONSTER
end
return _GetActiveType(se)
end
function Effect.IsActiveType(se,typ)
local typ2=se:GetActiveType()
return typ&typ2~=0
end
function Card.GetType(sc)
if sc==e:GetHandler() then
return TYPE_MONSTER+TYPE_EFFECT
end
return _GetType(sc)
end
function Card.IsType(sc,typ)
local typ2=sc:GetType()
return typ&typ2~=0
end
function Card.GetOriginalType(sc)
if sc==e:GetHandler() then
return TYPE_MONSTER+TYPE_EFFECT
end
return _GetOriginalType(sc)
end
c:SetEntityCode(code_list[val],false)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -128,7 +159,15 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re==te end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) c:SetEntityCode(m,false) Duel.ShuffleHand(tp) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
c:SetEntityCode(m,false)
Duel.ShuffleHand(tp)
Effect.IsActiveType=_IsActiveType
Effect.GetActiveType=_GetActiveType
Card.IsType=_IsType
Card.GetType=_GetType
Card.GetOriginalType=_GetOriginalType
end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
......@@ -225,6 +264,15 @@ function cm.cost6(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.IsPlayerCanDraw(tp,1) end
--[[if KOISHI_CHECK then
e:GetHandler():SetEntityCode(m,false)
Duel.ShuffleHand(tp)
Effect.IsActiveType=_IsActiveType
Effect.GetActiveType=_GetActiveType
Card.IsType=_IsType
Card.GetType=_GetType
Card.GetOriginalType=_GetOriginalType
end--]]
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
......
......@@ -7,14 +7,7 @@ function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c15000045.ffilter,2,false)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE+LOCATION_PZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE+LOCATION_PZONE,0,Duel.Release,REASON_COST)
--synchro custom
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -92,10 +85,6 @@ function c15000045.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
if sg:GetCount()==0 then break end
g:Merge(sg)
end
if g:IsExists(Card.IsLocation,1,nil,LOCATION_PZONE) then
for tc in aux.Next(g) do
end
end
Duel.SetSynchroMaterial(g)
end
function c15000045.cfilter(c)
......
......@@ -37,7 +37,7 @@ function cm.cfilter(c)
return not c:IsSetCard(0x10b)
end
function cm.sprcon(e,tp,eg,ep,ev,re,r,rp)
local ag=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local ag=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
return ag:GetCount()==0 or ag:FilterCount(cm.cfilter,nil)==0
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2500,7 +2500,7 @@ function cm.HartrazCheck(c)
e0:SetRange(0xff)
e0:SetCost(cm.Hztfcost)
e0:SetOperation(cm.Hztfop)
c:RegisterEffect(e0)
--c:RegisterEffect(e0)
end
function cm.Hztfcost(e,c,tp,st)
if bit.band(st,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK then
......@@ -2656,7 +2656,7 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
local rstg=Duel.GetMatchingGroup(function(c)return c.Snnm_Ef_Rst end,0,0xff,0xff,nil)
local rstt={}
for rstc in aux.Next(rstg) do if not cm.IsInTable(rstc:GetOriginalCode(),rstt) then table.insert(rstt,rstc:GetOriginalCode()) end end
if cm.IsInTable(53759012,rstt) then
if cm.IsInTable(53759012,rstt) then
c53759012[1]=Effect.SetLabelObject
Effect.SetLabelObject=function(se,le)
if aux.GetValueType(le)=="Effect" then
......@@ -2671,6 +2671,22 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
return c53759012[1](se,le)
end
end
if cm.IsInTable(53765001,rstt) then
AD_Helltaker=Effect.SetLabelObject
Effect.SetLabelObject=function(se,le)
if aux.GetValueType(le)=="Effect" then
local hte1=Effect.CreateEffect(se:GetOwner())
hte1:SetType(EFFECT_TYPE_FIELD)
hte1:SetCode(53765050)
hte1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
AD_Helltaker(hte1,se)
hte1:SetTargetRange(1,1)
Duel.RegisterEffect(hte1,0)
end
return AD_Helltaker(se,le)
end
end
Duel.RegisterFlagEffect(0,53764007,0,0,0)
local code=e:GetHandler():GetOriginalCode()
Card.RegisterEffect=function(sc,se,bool)
if cm.IsInTable(25000008,rstt) then
......@@ -2795,6 +2811,8 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
end
Card.RegisterEffect=reg
if cm.IsInTable(53759012,rstt) then Effect.SetLabelObject=c53759012[1] end
if cm.IsInTable(53765001,rstt) then Effect.SetLabelObject=AD_Helltaker end
Duel.ResetFlagEffect(0,53764007)
e:Reset()
end
function cm.reni(c,sdes,scat,styp,spro,scod,sran,sct,sht,scon,scos,stg,sop)
......@@ -4278,7 +4296,7 @@ function cm.RabbitTeamspop(e,tp,eg,ep,ev,re,r,rp,c)
local ct=Duel.GetFlagEffect(tp,num)
Duel.ResetFlagEffect(tp,num)
for i=1,ct-1 do Duel.RegisterFlagEffect(tp,num,RESET_PHASE+PHASE_END,0,1) end
local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_NEGATED)
e2:SetOperation(cm.RTreset1)
......@@ -4297,18 +4315,18 @@ function cm.RabbitTeamspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RegisterEffect(e4,tp)
end
function cm.RTreset1(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
Duel.ShuffleDeck(tp)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+53728000,re,r,rp,ep,ev)
e:Reset()
end
function cm.RTreset2(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp)
if e:GetLabelObject() then e:GetLabelObject():Reset() end
e:Reset()
Duel.ShuffleDeck(tp)
if e:GetLabelObject() then e:GetLabelObject():Reset() end
e:Reset()
end
function cm.RTreset3(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject() then e:GetLabelObject():Reset() end
e:Reset()
if e:GetLabelObject() then e:GetLabelObject():Reset() end
e:Reset()
end
function cm.RabbitTeamrecon(e)
local c=e:GetHandler()
......@@ -4463,3 +4481,60 @@ function cm.Ranclockspop2(att2)
end
end
end
function cm.TentuScout(c)
aux.EnableSpiritReturn(c,EVENT_SUMMON_SUCCESS,EVENT_FLIP)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--[[local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRIBUTE_LIMIT)
e2:SetValue(function(e,c)
return (not c:IsAttribute(e:GetHandler():GetAttribute()) and not c:IsType(TYPE_SPIRIT)) or (c:IsFacedown() and c:IsControler(1-e:GetHandlerPlayer()))
end)
c:RegisterEffect(e2)--]]
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(function(e,c)return c:IsFaceup() and c:IsAttribute(e:GetHandler():GetAttribute())end)
e3:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_SUMMON) and c:IsReason(REASON_MATERIAL) and c:IsReason(REASON_RELEASE)
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(53764000,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(1104)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1)
e5:SetCondition(cm.thcon)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(53764000)>0
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT) end
end
......@@ -196,6 +196,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t2,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(re3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -207,7 +208,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local dc=Duel.CreateToken(tp,m+50)
local de=dc:GetActivateEffect()
local ae2={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE)}
......@@ -220,6 +221,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t4,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(ae3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -231,7 +233,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local ret1,ret2={},{}
for k,v1 in pairs(t1) do
local equal=false
......
......@@ -200,6 +200,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t2,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(re3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -211,7 +212,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local dc=Duel.CreateToken(tp,m+50)
local de=dc:GetActivateEffect()
local ae2={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE)}
......@@ -224,6 +225,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t4,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(ae3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -235,7 +237,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local ret1,ret2={},{}
for k,v1 in pairs(t1) do
local equal=false
......
......@@ -313,6 +313,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t2,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(re3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -324,7 +325,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local dc=Duel.CreateToken(tp,m+50)
local de=dc:GetActivateEffect()
de:SetCategory(CATEGORY_TOGRAVE)
......@@ -338,6 +339,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t4,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(ae3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -349,7 +351,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local ret1,ret2={},{}
for k,v1 in pairs(t1) do
local equal=false
......
......@@ -306,6 +306,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t2,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(re3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -317,7 +318,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local dc=Duel.CreateToken(tp,m+50)
local de=dc:GetActivateEffect()
de:SetCategory(CATEGORY_RECOVER)
......@@ -331,6 +332,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t4,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(ae3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -342,7 +344,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local ret1,ret2={},{}
for k,v1 in pairs(t1) do
local equal=false
......
......@@ -168,6 +168,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t2,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(re3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -179,7 +180,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local dc=Duel.CreateToken(tp,m+50)
local de=dc:GetActivateEffect()
local ae2={Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_ACTIVATE)}
......@@ -192,6 +193,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
table.insert(t4,4)
end
end
--[[Waiting for further repair
for _,te3 in pairs(ae3) do
if not te3:GetLabelObject() then
local cost=te3:GetCost()
......@@ -203,7 +205,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end--]]
local ret1,ret2={},{}
for k,v1 in pairs(t1) do
local equal=false
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
aux.AddLinkProcedure(c,cm.mfilter,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
......
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