Commit 46093e00 authored by Huangnan's avatar Huangnan

fix

parent 3369da00
Pipeline #35552 passed with stages
in 51 minutes and 38 seconds
No preview for this file type
expansions/pics/5012605.jpg

88.6 KB | W: | H:

expansions/pics/5012605.jpg

88.8 KB | W: | H:

expansions/pics/5012605.jpg
expansions/pics/5012605.jpg
expansions/pics/5012605.jpg
expansions/pics/5012605.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/5012609.jpg

90.1 KB | W: | H:

expansions/pics/5012609.jpg

61.8 KB | W: | H:

expansions/pics/5012609.jpg
expansions/pics/5012609.jpg
expansions/pics/5012609.jpg
expansions/pics/5012609.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/5012612.jpg

100 KB | W: | H:

expansions/pics/5012612.jpg

82.2 KB | W: | H:

expansions/pics/5012612.jpg
expansions/pics/5012612.jpg
expansions/pics/5012612.jpg
expansions/pics/5012612.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/5012619.jpg

84.2 KB | W: | H:

expansions/pics/5012619.jpg

72.7 KB | W: | H:

expansions/pics/5012619.jpg
expansions/pics/5012619.jpg
expansions/pics/5012619.jpg
expansions/pics/5012619.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/5012627.jpg

114 KB | W: | H:

expansions/pics/5012627.jpg

90.5 KB | W: | H:

expansions/pics/5012627.jpg
expansions/pics/5012627.jpg
expansions/pics/5012627.jpg
expansions/pics/5012627.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/5012629.jpg

63.6 KB | W: | H:

expansions/pics/5012629.jpg

73.2 KB | W: | H:

expansions/pics/5012629.jpg
expansions/pics/5012629.jpg
expansions/pics/5012629.jpg
expansions/pics/5012629.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -170,9 +170,9 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(-500)
if s.roll(1,2)==1 then
if c:IsAttackBelow(499) then return end
if tc:IsAttackBelow(499) then return end
else
if c:IsDefenseBelow(499) then return end
if tc:IsDefenseBelow(499) then return end
e2:SetCode(EFFECT_UPDATE_DEFENSE)
end
tc:RegisterEffect(e2)
......
......@@ -24,6 +24,7 @@ function cm.initial_effect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
......
......@@ -297,13 +297,6 @@ function cm.TentuScout(c)
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)
......@@ -428,15 +421,11 @@ function cm.AASTadjustop(otyp,ext)
return
function(e,tp,eg,ep,ev,re,r,rp)
local adjt={}
if ext then adjt=ext else adjt={e:GetLabelObject()} end
if ext then
if type(ext)=="table" then adjt=ext else adjt={ext} end
else adjt={e:GetLabelObject()} end
if #adjt==0 then e:Reset() return end
for _,te in pairs(adjt) do
--local te=e:GetLabelObject()
--if not te then Debug.Message(e:GetLabel()) return else Debug.Message(555) return end
--if aux.GetValueType(te)~="Effect" then Debug.Message(aux.GetValueType(te)) return end
--Debug.Message(#te)
--Debug.Message(te:GetOwner():GetCode())
local c=te:GetHandler()
if not c:IsStatus(STATUS_CHAINING) and c:IsStatus(STATUS_EFFECT_ENABLED) then
local xe={c:IsHasEffect(53765099)}
......@@ -595,8 +584,6 @@ function cm.AASTcostop(otyp)
return
function(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
--Debug.Message(9999)
--Debug.Message(aux.GetValueType(te))
local c=te:GetHandler()
local xe1=cm.AASTregi(c,te)
if otyp&0x80000~=0 then
......@@ -670,21 +657,6 @@ function cm.AASTrsop(e,tp,eg,ep,ev,re,r,rp)
rc:CancelToGrave(false)
end
re:Reset()
--[[local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetLabelObject(re)
e1:SetOperation(cm.AASTreset)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
e:Reset()
end
function cm.AASTreset(e,tp,eg,ep,ev,re,r,rp)
local xe={e:GetOwner():IsHasEffect(53765099)}
for _,v in pairs(xe) do if v:GetLabelObject()==e:GetLabelObject() then v:Reset() end end
e:Reset()]]
end
function cm.AASTregi(c,e)
local e1=Effect.CreateEffect(c)
......@@ -1091,7 +1063,7 @@ function cm.SetAsSpellorTrapCheck(c,type)
end
end
local b=true
if sc.SSetableMonster and (ly>0 or Duel.GetFlagEffectLabel(0,53759000)==0) then
if sc.initial_effect and sc.SSetableMonster and (ly>0 or Duel.GetFlagEffectLabel(0,53759000)==0) then
if ly>0 then cm["Card_Prophecy_Certain_ACST_"..ly]=true end
else b=ADIMI_IsSSetable(sc,bool) end
return b
......@@ -1415,7 +1387,7 @@ function cm.SpellorTrapSPable(c)
break
end
end
if sc.SpecialSummonableSpellorTrap and (ly>0 or Duel.GetFlagEffectLabel(0,53759000)==0) and not sc:IsLocation(LOCATION_MZONE) then
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (ly>0 or Duel.GetFlagEffectLabel(0,53759000)==0) and not sc:IsLocation(LOCATION_MZONE) then
if sc:IsHasEffect(EFFECT_REVIVE_LIMIT) and not sc:IsStatus(STATUS_PROC_COMPLETE) and not bool1 then b=res end
local zcheck=false
for i=0,6 do
......@@ -1487,7 +1459,7 @@ function cm.SpellorTrapSPable(c)
local ADSTSP_SpecialSummon=Duel.SpecialSummon
Duel.SpecialSummon=function(tg,st,sp,stp,bool1,...)
tg=Group.__add(tg,tg)
local g=tg:Filter(function(c)return c.SpecialSummonableSpellorTrap end,nil)
local g=tg:Filter(function(c)return c.initial_effect and c.SpecialSummonableSpellorTrap end,nil)
if #g>0 then
bool1=true
for tc in aux.Next(g) do
......@@ -1499,7 +1471,7 @@ function cm.SpellorTrapSPable(c)
end
local ADSTSP_SpecialSummonStep=Duel.SpecialSummonStep
Duel.SpecialSummonStep=function(tc,st,sp,stp,bool1,...)
if tc.SpecialSummonableSpellorTrap then
if tc.initial_effect and tc.SpecialSummonableSpellorTrap then
bool1=true
local data=tc.SSST_Data
tc:AddMonsterAttribute(data[1])
......@@ -1519,7 +1491,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsType(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsType(sc,int) end
return b
end
local ADSTSP_IsSynchroType=Card.IsSynchroType
......@@ -1535,7 +1507,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsSynchroType(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsSynchroType(sc,int) end
return b
end
local ADSTSP_IsXyzType=Card.IsXyzType
......@@ -1551,7 +1523,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsXyzType(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsXyzType(sc,int) end
return b
end
local ADSTSP_IsLinkType=Card.IsLinkType
......@@ -1567,7 +1539,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsLinkType(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&(TYPE_MONSTER|data[1])~=0) else b=ADSTSP_IsLinkType(sc,int) end
return b
end
local ADSTSP_CGetType=Card.GetType
......@@ -1583,7 +1555,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
return b
end
local ADSTSP_GetSynchroType=Card.GetSynchroType
......@@ -1599,7 +1571,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
return b
end
local ADSTSP_GetXyzType=Card.GetXyzType
......@@ -1615,7 +1587,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
return b
end
local ADSTSP_GetLinkType=Card.GetLinkType
......@@ -1631,7 +1603,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=TYPE_MONSTER|data[1] end
return b
end
local ADSTSP_IsRace=Card.IsRace
......@@ -1647,7 +1619,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&data[2]~=0) else b=ADSTSP_IsRace(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&data[2]~=0) else b=ADSTSP_IsRace(sc,int) end
return b
end
local ADSTSP_GetRace=Card.GetRace
......@@ -1663,7 +1635,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[2] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[2] end
return b
end
local ADSTSP_GetOriginalRace=Card.GetOriginalRace
......@@ -1679,7 +1651,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[2] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[2] end
return b
end
local ADSTSP_GetLinkRace=Card.GetLinkRace
......@@ -1695,7 +1667,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[2] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[2] end
return b
end
local ADSTSP_IsAttribute=Card.IsAttribute
......@@ -1711,7 +1683,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&data[3]~=0) else b=ADSTSP_IsAttribute(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&data[3]~=0) else b=ADSTSP_IsAttribute(sc,int) end
return b
end
local ADSTSP_IsNonAttribute=Card.IsNonAttribute
......@@ -1727,7 +1699,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&data[3]==0) else b=ADSTSP_IsNonAttribute(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int&data[3]==0) else b=ADSTSP_IsNonAttribute(sc,int) end
return b
end
local ADSTSP_GetAttribute=Card.GetAttribute
......@@ -1743,7 +1715,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[3] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[3] end
return b
end
local ADSTSP_GetOriginalAttribute=Card.GetOriginalAttribute
......@@ -1759,7 +1731,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[3] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[3] end
return b
end
local ADSTSP_GetLinkAttribute=Card.GetLinkAttribute
......@@ -1775,7 +1747,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[3] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[3] end
return b
end
local ADSTSP_IsLevel=Card.IsLevel
......@@ -1791,7 +1763,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int==data[4]) else b=ADSTSP_IsLevel(sc,int,...) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int==data[4]) else b=ADSTSP_IsLevel(sc,int,...) end
return b
end
local ADSTSP_IsLevelAbove=Card.IsLevelAbove
......@@ -1807,7 +1779,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int<=data[4]) else b=ADSTSP_IsLevelAbove(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int<=data[4]) else b=ADSTSP_IsLevelAbove(sc,int) end
return b
end
local ADSTSP_IsLevelBelow=Card.IsLevelBelow
......@@ -1823,7 +1795,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int>=data[4]) else b=ADSTSP_IsLevelBelow(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int>=data[4]) else b=ADSTSP_IsLevelBelow(sc,int) end
return b
end
local ADSTSP_GetLevel=Card.GetLevel
......@@ -1839,7 +1811,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[4] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[4] end
return b
end
local ADSTSP_GetOriginalLevel=Card.GetOriginalLevel
......@@ -1855,7 +1827,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[4] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[4] end
return b
end
local ADSTSP_IsAttack=Card.IsAttack
......@@ -1871,7 +1843,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int==data[5]) else b=ADSTSP_IsAttack(sc,int,...) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int==data[5]) else b=ADSTSP_IsAttack(sc,int,...) end
return b
end
local ADSTSP_IsAttackAbove=Card.IsAttackAbove
......@@ -1887,7 +1859,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int<=data[5]) else b=ADSTSP_IsAttackAbove(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int<=data[5]) else b=ADSTSP_IsAttackAbove(sc,int) end
return b
end
local ADSTSP_IsAttackBelow=Card.IsAttackBelow
......@@ -1903,7 +1875,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int>=data[5]) else b=ADSTSP_IsAttackBelow(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int>=data[5]) else b=ADSTSP_IsAttackBelow(sc,int) end
return b
end
local ADSTSP_GetAttack=Card.GetAttack
......@@ -1919,7 +1891,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[5] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[5] end
return b
end
local ADSTSP_GetBaseAttack=Card.GetBaseAttack
......@@ -1935,7 +1907,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[5] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[5] end
return b
end
local ADSTSP_IsDefense=Card.IsDefense
......@@ -1951,7 +1923,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int==data[6]) else b=ADSTSP_IsDefense(sc,int,...) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int==data[6]) else b=ADSTSP_IsDefense(sc,int,...) end
return b
end
local ADSTSP_IsDefenseAbove=Card.IsDefenseAbove
......@@ -1967,7 +1939,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int<=data[6]) else b=ADSTSP_IsDefenseAbove(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int<=data[6]) else b=ADSTSP_IsDefenseAbove(sc,int) end
return b
end
local ADSTSP_IsDefenseBelow=Card.IsDefenseBelow
......@@ -1983,7 +1955,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int>=data[6]) else b=ADSTSP_IsDefenseBelow(sc,int) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=(int>=data[6]) else b=ADSTSP_IsDefenseBelow(sc,int) end
return b
end
local ADSTSP_GetDefense=Card.GetDefense
......@@ -1999,7 +1971,7 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[6] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[6] end
return b
end
local ADSTSP_GetBaseDefense=Card.GetBaseDefense
......@@ -2015,11 +1987,11 @@ function cm.SpellorTrapSPable(c)
local res1=ly>0 and (cm["Card_Prophecy_L_Check_"..ly] or cm["Card_Prophecy_Certain_SP_"..ly])
local res2=Duel.GetFlagEffectLabel(0,53759000)==0 and not sc:IsLocation(LOCATION_MZONE)
local data=sc.SSST_Data
if sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[6] end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and (res1 or res2) then b=data[6] end
return b
end
local ADSTSP_IsCanBeEffectTarget=Card.IsCanBeEffectTarget
Card.IsCanBeEffectTarget=function(sc,se)
Card.IsCanBeEffectTarget=function(sc,...)
local b=true
local ly=0
for i=1,114 do
......@@ -2028,7 +2000,7 @@ function cm.SpellorTrapSPable(c)
break
end
end
if sc.SpecialSummonableSpellorTrap and cm["Card_Prophecy_Certain_SP_"..ly] then b=res else b=ADSTSP_IsCanBeEffectTarget(sc,se) end
if sc.initial_effect and sc.SpecialSummonableSpellorTrap and cm["Card_Prophecy_Certain_SP_"..ly] then b=res else b=ADSTSP_IsCanBeEffectTarget(sc,...) end
return b
end
end
......@@ -2323,16 +2295,6 @@ function cm.HTAmvrsop(e,tp,eg,ep,ev,re,r,rp)
rc:CancelToGrave(false)
end
if re then re:Reset() end
--[[local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_END)
e1:SetCountLimit(1)
e1:SetLabelObject(re)
e1:SetOperation(cm.AASTreset)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
e:Reset()--]]
end
function cm.HTAmvhint(code)
return
......@@ -2357,7 +2319,7 @@ function cm.DragoronMergedDelay(c)
g:KeepAlive()
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetCode(EVENT_CHAIN_SOLVING)
ge1:SetLabelObject(g)
ge1:SetOperation(cm.DragoronM1)
Duel.RegisterEffect(ge1,0)
......@@ -2465,7 +2427,7 @@ function cm.DragoronActivate(c,code)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetProperty(EFFECT_FLAG_DELAY)
--ge3:SetProperty(EFFECT_FLAG_DELAY)
ge3:SetCode(EVENT_MOVE)
ge3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,0,0xff,0xff,nil)
......@@ -2618,7 +2580,7 @@ function cm.DragoronActivate(c,code)
Card.GetActivateEffect=function(ac)
local re=ADGD_GetActivateEffect(ac)
local le={ac:IsHasEffect(53757000)}
if #le>0 then
if #le>0 and not ac:IsLocation(LOCATION_FZONE) then
le=le[1]
re=le:GetLabelObject()
end
......@@ -3272,8 +3234,8 @@ function cm.WhitkinsToGrave(g,reason)
if gct>1 then
while true do
if #mg==0 then break end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(53767028,15))
local sc=mg:SelectUnselect(sg,tp,false,#sg>0,#mg,gct)
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(53767028,15))
local sc=mg:SelectUnselect(sg,p,true,#sg>0,#mg,gct)
if not sc then break elseif mg:IsContains(sc) then
mg:RemoveCard(sc)
sg:AddCard(sc)
......
......@@ -92,8 +92,7 @@ function cm.bkop(e,tp,eg,ep,ev,re,r,rp,c)
if op==0 then
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
Duel.BreakEffect()
local num=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local ug=Duel.GetFieldGroup(tp,LOCATION_DECK,0):Sub(Duel.GetDecktopGroup(tp,num-1))
local ug=Duel.GetFieldGroup(tp,LOCATION_DECK,0):Filter(cm.location,nil)
Duel.SendtoHand(ug,nil,REASON_EFFECT)
elseif op==1 then
Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
......@@ -103,6 +102,9 @@ function cm.bkop(e,tp,eg,ep,ev,re,r,rp,c)
end
end
end
function cm.location(c)
return c:GetSequence()==0
end
--random
function getrand()
local result=0
......
......@@ -42,6 +42,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
......
......@@ -34,7 +34,7 @@ function s.thfilter(c)
return c:IsCode(60000211) and c:IsAbleToHand()
end
function s.spfilter(c,e,tp)
return c:IsCode(60000211) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
return c:IsCode(60000211) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and (c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -54,7 +54,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local b2=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,id+20000000)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not b1 and not b2 then return end
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(id,2)},{b2,aux.Stringid(id,3)})
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(id,1)},{b2,aux.Stringid(id,2)})
if op==1 then
Duel.RegisterFlagEffect(tp,id+10000000,RESET_PHASE+PHASE_END,0,1)
-- 检索效果
......
......@@ -53,7 +53,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
if Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
......
......@@ -55,7 +55,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
if Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
......
......@@ -112,7 +112,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
g:AddCard(ac)
if g:GetClassCount(Card.GetRace)==g:GetCount() and g:GetClassCount(Card.GetAttribute)==g:GetCount() then
cg:AddCard(ac)
Debug.Message("1")
--Debug.Message("1")
end
g:RemoveCard(ac)
ac=dg:GetNext()
......
......@@ -38,7 +38,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
te:UseCountLimit(tp,1,true)
cm.ActivateCard(ec,tp,e)
if (not (ec:IsType(TYPE_CONTINUOUS) or ec:IsType(TYPE_FIELD) or ec:IsType(TYPE_EQUIP))) and ec:IsRelateToEffect(e) then
if not (ec:IsType(TYPE_CONTINUOUS) or ec:IsType(TYPE_FIELD) or ec:IsType(TYPE_EQUIP)) then
Duel.SendtoGrave(ec,REASON_RULE)
end
end
......
......@@ -9,12 +9,15 @@ function cm.initial_effect(c)
e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e11:SetRange(LOCATION_HAND)
e11:SetCountLimit(1,m+10000000)
e11:SetCondition(cm.spcon)
e11:SetTarget(cm.sptg)
e11:SetOperation(cm.spop)
c:RegisterEffect(e11)
local e22=e11:Clone()
e22:SetCondition(cm.spcon2)
c:RegisterEffect(e22)
--search
local e3=Effect.CreateEffect(c)
--e3:SetDescription(aux.Stringid(m,4))
......@@ -27,12 +30,18 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsSummonPlayer(1-tp) and (c:IsSummonLocation(LOCATION_EXTRA) or Duel.IsPlayerAffectedByEffect(tp,60010135))
return c:IsSummonPlayer(1-tp) --and (c:IsSummonLocation(LOCATION_EXTRA) or Duel.IsPlayerAffectedByEffect(tp,60010135))
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return eg:IsExists(cm.cfilter,1,nil,tp) and Duel.IsPlayerAffectedByEffect(tp,60010135)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -37,7 +37,7 @@ function c60010077.initial_effect(c)
c:RegisterEffect(e3)
end
function c60010077.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil)
return not Duel.IsExistingMatchingCard(aux.TRUE,e:GetHandlerPlayer(),LOCATION_FZONE,0,1,nil)
end
function c60010077.filter(c,tp)
return c:IsCode(60010029) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
......
......@@ -85,7 +85,6 @@ function c60010137.drop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c60010137.draw)
Duel.RegisterEffect(e1,tp)
end
......@@ -99,6 +98,7 @@ function c60010137.draw(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,sg)
end
end
e:Reset()
end
function c60010137.ownerfilter(c,tp)
return c:IsCode(60010031) and c:IsFaceup() and c:IsSummonPlayer(tp)
......
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