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)
......
This diff is collapsed.
......@@ -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