Commit c8920464 authored by POLYMER's avatar POLYMER

fix

parent 09701d35
......@@ -3,7 +3,7 @@ local m=14000229
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,cm.mfilter,10,2,nil,nil,99)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),10,2,nil,nil,99)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
......
......@@ -110,7 +110,7 @@ function cm.actfilter(c)
return c:IsType(TYPE_PENDULUM) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(cm.actfilter,c:GetControler(),LOCATION_EXTRA,0,nil)<Duel.GetMatchingGroupCount(cm.actfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
return Duel.GetMatchingGroupCount(cm.actfilter,e:GetHandler(),LOCATION_EXTRA,0,nil)<Duel.GetMatchingGroupCount(cm.actfilter,e:GetHandler(),LOCATION_GRAVE,0,nil)
end
function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
......
......@@ -101,7 +101,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -6547,7 +6547,30 @@ function cm.HTAmvhint(code)
else c:RegisterFlagEffect(code+50,RESET_EVENT+0x7e0000,EFFECT_FLAG_CLIENT_HINT,1,1,aux.Stringid(53765000,0)) end
end
end
function cm.DragoronActivate(c)
function cm.DragoronActivate(c,code)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetCountLimit(1,code+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetSequence()<5 end)
e1:SetLabelObject(e0)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ACTIVATE_COST)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(1,1)
e3:SetLabelObject(e1)
e3:SetTarget(cm.ADGDactarget)
e3:SetOperation(cm.ADGDcostop)
Duel.RegisterEffect(e3,0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_SEND_REPLACE)
......@@ -6579,6 +6602,7 @@ function cm.DragoronActivate(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e8:SetCode(53757000)
e8:SetLabelObject(e1)
e8:SetCondition(function(e)
return e:GetHandler():IsLocation(LOCATION_SZONE)
end)
......@@ -6615,13 +6639,7 @@ function cm.DragoronActivate(c)
local mv=Duel.SelectDisableField(tgp,1,LOCATION_SZONE,0,0)
Duel.MoveSequence(fc,math.log(mv,2)-8)
if fc:IsFacedown() then Duel.ChangePosition(fc,POS_FACEUP) end
local e1=Effect.CreateEffect(fc)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
fc:RegisterEffect(e1,true)
cm.ADGDTypeChange(fc)
end
end
local ct=ADGD_SSet(tp,tg,tgp,...)
......@@ -6639,13 +6657,7 @@ function cm.DragoronActivate(c)
local mv=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
Duel.MoveSequence(fc,math.log(mv,2)-8)
if fc:IsFacedown() then Duel.ChangePosition(fc,POS_FACEUP) end
local e1=Effect.CreateEffect(fc)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
fc:RegisterEffect(e1)
cm.ADGDTypeChange(fc)
tg:RemoveCard(fc)
end
end
......@@ -6662,13 +6674,7 @@ function cm.DragoronActivate(c)
local mv=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
Duel.MoveSequence(fc,math.log(mv,2)-8)
if fc:IsFacedown() then Duel.ChangePosition(fc,POS_FACEUP) end
local e1=Effect.CreateEffect(fc)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
fc:RegisterEffect(e1)
cm.ADGDTypeChange(fc)
tg:RemoveCard(fc)
end
end
......@@ -6685,13 +6691,7 @@ function cm.DragoronActivate(c)
local mv=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
Duel.MoveSequence(fc,math.log(mv,2)-8)
if fc:IsFacedown() then Duel.ChangePosition(fc,POS_FACEUP) end
local e1=Effect.CreateEffect(fc)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
fc:RegisterEffect(e1)
cm.ADGDTypeChange(fc)
tg:RemoveCard(fc)
end
end
......@@ -6708,13 +6708,7 @@ function cm.DragoronActivate(c)
local mv=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
Duel.MoveSequence(fc,math.log(mv,2)-8)
if fc:IsFacedown() then Duel.ChangePosition(fc,POS_FACEUP) end
local e1=Effect.CreateEffect(fc)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
fc:RegisterEffect(e1)
cm.ADGDTypeChange(fc)
tg:RemoveCard(fc)
end
end
......@@ -6731,13 +6725,7 @@ function cm.DragoronActivate(c)
local mv=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
Duel.MoveSequence(fc,math.log(mv,2)-8)
if fc:IsFacedown() then Duel.ChangePosition(fc,POS_FACEUP) end
local e1=Effect.CreateEffect(fc)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
fc:RegisterEffect(e1)
cm.ADGDTypeChange(fc)
tg:RemoveCard(fc)
end
end
......@@ -6750,6 +6738,7 @@ function cm.DragoronActivate(c)
end
ADGD_CRegisterEffect=Card.RegisterEffect
Card.RegisterEffect=function(rc,re,...)
if re and re:GetCode()==117 and rc:GetType()==re:GetValue() then return end
if Dragoron_Reset_Check then
local e1=Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -6770,16 +6759,32 @@ function cm.DragoronActivate(c)
ADGD_MoveToField=Duel.MoveToField
Duel.MoveToField=function(mc,p,tgp,dest,...)
mc:ResetFlagEffect(53757050)
local res=ADGD_MoveToField(mc,p,tgp,dest,...)
if dest==LOCATION_FZONE then mc:RegisterFlagEffect(53757050,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1) end
return ADGD_MoveToField(mc,p,tgp,dest,...)
if dest==LOCATION_SZONE and mc:IsHasEffect(53757000) then cm.ADGDTypeChange(mc) end
return res
end
ADGD_MoveSequence=Duel.MoveSequence
Duel.MoveSequence=function(mc,seq)
mc:ResetFlagEffect(53757050)
return ADGD_MoveSequence(mc,seq)
end
ADGD_GetActivateEffect=Card.GetActivateEffect
Card.GetActivateEffect=function(ac)
local re=ADGD_GetActivateEffect(ac)
local le={ac:IsHasEffect(53757000)}
if #le>0 then
le=le[1]
re=le:GetLabelObject()
end
return re
end
ADGD_GetOriginalType=Card.GetOriginalType
Card.GetOriginalType=function(ac)
if ac:IsHasEffect(53757000) then return 0x80002 else return ADGD_GetOriginalType(ac) end
end
end
return e5,e6,e6_1
return e0,e1,e3,e5,e6,e6_1
end
function cm.ADGDresetfil(c,tc)
return c==tc and ((c:IsPreviousLocation(LOCATION_FZONE) and not c:IsLocation(LOCATION_FZONE)) or (c:IsLocation(LOCATION_FZONE) and not c:IsPreviousLocation(LOCATION_FZONE)))
......@@ -6827,6 +6832,24 @@ end
function cm.ADGDrepval(e,c)
return cm.ADGDrepfilter(c,e:GetLabelObject())
end
function cm.ADGDTypeChange(c)
c:SetCardData(CARDDATA_TYPE,0x20002)
local t={}
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_MOVE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():SetCardData(4,0x80002)
for k,v in pairs(t) do v:Reset() end
end)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():IsLocation(LOCATION_SZONE) and e:GetHandler():GetSequence()<5 end)
c:RegisterEffect(e2,true)
t={e1,e2}
end
function cm.ADGDrepoperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if not c:IsLocation(LOCATION_FZONE) then return end
......@@ -6835,13 +6858,7 @@ function cm.ADGDrepoperation(e,tp,eg,ep,ev,re,r,rp)
local mv=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
Duel.MoveSequence(c,math.log(mv,2)-8)
if c:IsFacedown() then Duel.ChangePosition(c,POS_FACEUP) end
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
cm.ADGDTypeChange(c)
end
function cm.ADGDactarget2(e,te,tp)
local c=e:GetLabelObject()
......@@ -6854,6 +6871,58 @@ function cm.ADGDactarget3(e,tc,tp)
local p=c:GetControler()
return Duel.GetLocationCount(p,LOCATION_SZONE)>0 and tc:IsType(TYPE_FIELD) and c:IsLocation(LOCATION_FZONE) and c:IsControler(p) and tc:GetControler()==p and tc~=c
end
function cm.ADGDactarget(e,te,tp)
local ce=e:GetLabelObject()
return te:GetHandler()==e:GetOwner() and te==ce and ce:GetHandler():IsLocation(LOCATION_SZONE) and ce:GetHandler():GetSequence()<5
end
function cm.ADGDcostop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
local c=te:GetHandler()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then Duel.SendtoGrave(fc,REASON_RULE) end
Duel.MoveSequence(c,5)
if c:IsFacedown() then Duel.ChangePosition(c,POS_FACEUP) end
c:SetStatus(STATUS_EFFECT_ENABLED,false)
c:CreateEffectRelation(te)
te:SetType(EFFECT_TYPE_ACTIVATE)
local ev0=Duel.GetCurrentChain()+1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return ev==ev0 end)
e1:SetOperation(cm.ADGDrsop)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
e3:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_CHAIN)
c:RegisterEffect(e3)
end
function cm.ADGDrsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
rc:CancelToGrave(false)
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:SetLabelObject(re)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)e:GetLabelObject():SetType(EFFECT_TYPE_IGNITION)e:Reset()end)
Duel.RegisterEffect(e1,tp)
e:Reset()
end
function cm.GoronDimensionCopy(c,cd,tab)
local cat,type,code,cost,con,tg,op,pro1,pro2=table.unpack(tab)
if type&EFFECT_TYPE_SINGLE~=0 then return end
......
......@@ -4,29 +4,8 @@ cm.name="次元秽界 赤"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1,e1_1,e2,e3=SNNM.ActivatedAsSpellorTrap(c,0x80002,LOCATION_SZONE,true,true)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()<5
end)
e1:SetLabelObject(e0)
e1_1:SetRange(0xff)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_SZONE)
end)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject():GetHandler()
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5
end)
e3:SetTarget(cm.actarget)
local e5,e6,e6_1=SNNM.DragoronActivate(c)
SNNM.Global_in_Initial_Reset(c,{e2,e3,e5,e6,e6_1})
local e0,e1,e3,e5,e6,e6_1=SNNM.DragoronActivate(c,m)
SNNM.Global_in_Initial_Reset(c,{e3,e5,e6,e6_1})
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,2))
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
......@@ -56,11 +35,6 @@ function cm.initial_effect(c)
e11:SetTarget(cm.cptg)
e11:SetOperation(cm.cpop)
c:RegisterEffect(e11)
SNNM.ActivatedAsSpellorTrapCheck(c)
end
function cm.actarget(e,te,tp)
local ce=e:GetLabelObject()
return te:GetHandler()==e:GetOwner() and te==ce and ce:GetHandler():IsLocation(LOCATION_SZONE) and ce:GetHandler():GetSequence()<5
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
......
......@@ -4,29 +4,8 @@ cm.name="次元秽界 金"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1,e1_1,e2,e3=SNNM.ActivatedAsSpellorTrap(c,0x80002,LOCATION_SZONE,true,true)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()<5
end)
e1:SetLabelObject(e0)
e1_1:SetRange(0xff)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_SZONE)
end)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject():GetHandler()
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5
end)
e3:SetTarget(cm.actarget)
local e5,e6,e6_1=SNNM.DragoronActivate(c)
SNNM.Global_in_Initial_Reset(c,{e2,e3,e5,e6,e6_1})
local e0,e1,e3,e5,e6,e6_1=SNNM.DragoronActivate(c,m)
SNNM.Global_in_Initial_Reset(c,{e3,e5,e6,e6_1})
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,2))
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
......@@ -56,11 +35,6 @@ function cm.initial_effect(c)
e11:SetTarget(cm.cptg)
e11:SetOperation(cm.cpop)
c:RegisterEffect(e11)
SNNM.ActivatedAsSpellorTrapCheck(c)
end
function cm.actarget(e,te,tp)
local ce=e:GetLabelObject()
return te:GetHandler()==e:GetOwner() and te==ce and ce:GetHandler():IsLocation(LOCATION_SZONE) and ce:GetHandler():GetSequence()<5
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and e:GetHandler():GetSequence()>4
......
......@@ -4,34 +4,13 @@ cm.name="次元秽界 律"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1,e1_1,e2,e3=SNNM.ActivatedAsSpellorTrap(c,0x80002,LOCATION_SZONE,true,true)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()<5
end)
e1:SetLabelObject(e0)
e1_1:SetRange(0xff)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_SZONE)
end)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject():GetHandler()
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5
end)
e3:SetTarget(cm.actarget)
local e5,e6,e6_1=SNNM.DragoronActivate(c)
SNNM.Global_in_Initial_Reset(c,{e2,e3,e5,e6,e6_1})
local e0,e1,e3,e5,e6,e6_1=SNNM.DragoronActivate(c,m)
SNNM.Global_in_Initial_Reset(c,{e3,e5,e6,e6_1})
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,2))
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_CHAINING)
e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetRange(LOCATION_FZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon)
......@@ -56,11 +35,6 @@ function cm.initial_effect(c)
e11:SetTarget(cm.cptg)
e11:SetOperation(cm.cpop)
c:RegisterEffect(e11)
SNNM.ActivatedAsSpellorTrapCheck(c)
end
function cm.actarget(e,te,tp)
local ce=e:GetLabelObject()
return te:GetHandler()==e:GetOwner() and te==ce and ce:GetHandler():IsLocation(LOCATION_SZONE) and ce:GetHandler():GetSequence()<5
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp)return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSummonPlayer(1-tp)end,1,nil,tp) and e:GetHandler():GetSequence()>4
......
......@@ -4,34 +4,13 @@ cm.name="次元秽界 铜"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1,e1_1,e2,e3=SNNM.ActivatedAsSpellorTrap(c,0x80002,LOCATION_SZONE,true,true)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()<5
end)
e1:SetLabelObject(e0)
e1_1:SetRange(0xff)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_SZONE)
end)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject():GetHandler()
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5
end)
e3:SetTarget(cm.actarget)
local e5,e6,e6_1=SNNM.DragoronActivate(c)
SNNM.Global_in_Initial_Reset(c,{e2,e3,e5,e6,e6_1})
local e0,e1,e3,e5,e6,e6_1=SNNM.DragoronActivate(c,m)
SNNM.Global_in_Initial_Reset(c,{e3,e5,e6,e6_1})
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,2))
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_CHAINING)
e9:SetCode(EVENT_TO_GRAVE)
e9:SetRange(LOCATION_FZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon)
......@@ -56,11 +35,6 @@ function cm.initial_effect(c)
e11:SetTarget(cm.cptg)
e11:SetOperation(cm.cpop)
c:RegisterEffect(e11)
SNNM.ActivatedAsSpellorTrapCheck(c)
end
function cm.actarget(e,te,tp)
local ce=e:GetLabelObject()
return te:GetHandler()==e:GetOwner() and te==ce and ce:GetHandler():IsLocation(LOCATION_SZONE) and ce:GetHandler():GetSequence()<5
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp)return c:IsControler(tp) and c:GetReasonPlayer()==tp and c:IsType(TYPE_MONSTER)end,1,nil,1-tp) and e:GetHandler():GetSequence()>4
......
......@@ -4,34 +4,13 @@ cm.name="次元秽界 冽"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1,e1_1,e2,e3=SNNM.ActivatedAsSpellorTrap(c,0x80002,LOCATION_SZONE,true,true)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()<5
end)
e1:SetLabelObject(e0)
e1_1:SetRange(0xff)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_SZONE)
end)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject():GetHandler()
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()<5
end)
e3:SetTarget(cm.actarget)
local e5,e6,e6_1=SNNM.DragoronActivate(c)
SNNM.Global_in_Initial_Reset(c,{e2,e3,e5,e6,e6_1})
local e0,e1,e3,e5,e6,e6_1=SNNM.DragoronActivate(c,m)
SNNM.Global_in_Initial_Reset(c,{e3,e5,e6,e6_1})
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,2))
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_DELAY)
e9:SetCode(EVENT_CHAINING)
e9:SetCode(EVENT_MOVE)
e9:SetRange(LOCATION_FZONE)
e9:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e9:SetCondition(cm.pcon)
......@@ -56,11 +35,6 @@ function cm.initial_effect(c)
e11:SetTarget(cm.cptg)
e11:SetOperation(cm.cpop)
c:RegisterEffect(e11)
SNNM.ActivatedAsSpellorTrapCheck(c)
end
function cm.actarget(e,te,tp)
local ce=e:GetLabelObject()
return te:GetHandler()==e:GetOwner() and te==ce and ce:GetHandler():IsLocation(LOCATION_SZONE) and ce:GetHandler():GetSequence()<5
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp)return c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_DECK) and not c:IsLocation(LOCATION_DECK)end,1,nil,tp) and e:GetHandler():GetSequence()>4
......
......@@ -50,45 +50,28 @@ function c65130301.initial_effect(c)
end
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
--random seed
--(本段代码出自黑莲的派对狂欢系列,赞美黑莲)
--random seed
local A=1103515245
local B=12345
local M=32767
function roll(min,max)
if not random_seed then
local result=0
local g=Duel.GetDecktopGroup(0,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
local g=Duel.GetDecktopGroup(1,5)
local tc=g:GetFirst()
while tc do
result=result+tc:GetCode()
tc=g:GetNext()
end
g:DeleteGroup()
random_seed=result
function roll(min,max)
if min==max then return min end
min=tonumber(min)
max=tonumber(max)
random_seed=(random_seed*16807)%2147484647
if min~=nil then
if max==nil then
local random_number=random_seed/2147484647
return math.floor(random_number*min)+1
else
local random_number=random_seed/2147484647
if random_number<min then
random_seed=(random_seed*16807)%2147484647
random_number=random_seed/2147484647
end
return math.floor((max-min)*random_number)+1+min
end
end
return random_seed
local g=Duel.GetFieldGroup(0,0xff,0xff):RandomSelect(2,1)
random_seed=g:GetFirst():GetCode()+Duel.GetTurnCount()+Duel.GetFieldGroupCount(1,LOCATION_GRAVE,0)
end
min=tonumber(min)
max=tonumber(max)
random_seed=((random_seed*A+B)%M)/M
if min~=nil then
if max==nil then
return math.floor(random_seed*min)+1
else
max=max-min+1
return math.floor(random_seed*max+min)
end
end
return random_seed
end
function c65130301.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
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