Commit 39a0e926 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 08d9a146
Pipeline #29808 failed with stages
in 32 minutes and 43 seconds
...@@ -45,7 +45,7 @@ function s.initial_effect(c) ...@@ -45,7 +45,7 @@ function s.initial_effect(c)
end end
-- --
function s.ckfilter0(c,code) function s.ckfilter0(c,code)
return (c:IsLevelAbove(5) or c:IsRankAbove(5)) and c:GetOriginalCode()==code and c:GetFlagEffect(id)==0 return (c:IsLevelAbove(5) or c:IsRank(5)) and c:GetOriginalCode()==code and c:GetFlagEffect(id)==0
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -116,12 +116,33 @@ end ...@@ -116,12 +116,33 @@ end
function s.movefilter(c) function s.movefilter(c)
local seq=c:GetSequence() local seq=c:GetSequence()
local tp=c:GetControler() local tp=c:GetControler()
return seq<=4 and c:IsCode(12835101) and c:IsFaceup() and (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) or seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) return seq<=4 and c:IsCode(12835101) and c:IsFaceup() and (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) or seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) and c:IsAttackAbove(500) and c:IsDefenseAbove(500)
end end
function s.movecon(e,tp,eg,ep,ev,re,r,rp) function s.movecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPublic() and rp==1-tp and Duel.IsExistingMatchingCard(s.movefilter,tp,LOCATION_MZONE,0,1,nil) return c:IsPublic() and rp==1-tp and Duel.IsExistingMatchingCard(s.movefilter,tp,LOCATION_MZONE,0,1,nil)
end end
local A=1103515245
local B=12345
local M=32767
function s.roll(min,max)
if not s.random then
local g=Duel.GetFieldGroup(0,0xff,0xff):RandomSelect(2,1)
s.random=g:GetFirst():GetCode()+Duel.GetTurnCount()+Duel.GetFieldGroupCount(1,LOCATION_GRAVE,0)
end
min=tonumber(min)
max=tonumber(max)
s.random=((s.random*A+B)%M)/M
if min~=nil then
if max==nil then
return math.floor(s.random*min)+1
else
max=max-min+1
return math.floor(s.random*max+min)
end
end
return s.random
end
function s.moveop(e,tp,eg,ep,ev,re,r,rp) function s.moveop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.movefilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(s.movefilter,tp,LOCATION_MZONE,0,nil)
...@@ -148,10 +169,20 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp) ...@@ -148,10 +169,20 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.efilter) e1:SetValue(s.efilter)
tc:RegisterEffect(e1) tc:RegisterEffect(e1,true)
local re=Effect.CreateEffect(c)
re:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
re:SetRange(LOCATION_MZONE)
re:SetCode(EVENT_CHAIN_END)
re:SetReset(RESET_EVENT+RESETS_STANDARD)
re:SetLabelObject(e1)
re:SetOperation(function(e) e:GetLabelObject():Reset() e:Reset() end)
tc:RegisterEffect(re,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -148,9 +148,18 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp) ...@@ -148,9 +148,18 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.efilter) e1:SetValue(s.efilter)
tc:RegisterEffect(e1) tc:RegisterEffect(e1,true)
local re=Effect.CreateEffect(c)
re:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
re:SetRange(LOCATION_MZONE)
re:SetCode(EVENT_CHAIN_END)
re:SetReset(RESET_EVENT+RESETS_STANDARD)
re:SetLabelObject(e1)
re:SetOperation(function(e) e:GetLabelObject():Reset() e:Reset() end)
tc:RegisterEffect(re,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
......
...@@ -148,9 +148,18 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp) ...@@ -148,9 +148,18 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.efilter) e1:SetValue(s.efilter)
tc:RegisterEffect(e1) tc:RegisterEffect(e1,true)
local re=Effect.CreateEffect(c)
re:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
re:SetRange(LOCATION_MZONE)
re:SetCode(EVENT_CHAIN_END)
re:SetReset(RESET_EVENT+RESETS_STANDARD)
re:SetLabelObject(e1)
re:SetOperation(function(e) e:GetLabelObject():Reset() e:Reset() end)
tc:RegisterEffect(re,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -4,6 +4,7 @@ function s.initial_effect(c) ...@@ -4,6 +4,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
...@@ -11,13 +12,13 @@ function s.initial_effect(c) ...@@ -11,13 +12,13 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(s.drcost) e2:SetCost(s.drcost)
e2:SetTarget(s.drtg) e2:SetTarget(s.drtg)
e2:SetOperation(s.drop) e2:SetOperation(s.drop)
c:RegisterEffect(e1) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
......
...@@ -26,8 +26,8 @@ function c63924105.initial_effect(c) ...@@ -26,8 +26,8 @@ function c63924105.initial_effect(c)
--release --release
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(63924105,1)) e2:SetDescription(aux.Stringid(63924105,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCategory(CATEGORY_RELEASE) e2:SetCategory(CATEGORY_RELEASE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
...@@ -108,7 +108,7 @@ function c63924105.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,7 +108,7 @@ function c63924105.operation(e,tp,eg,ep,ev,re,r,rp)
local type=TYPE_MONSTER local type=TYPE_MONSTER
if op==1 then type=TYPE_SPELL end if op==1 then type=TYPE_SPELL end
if op==2 then type=TYPE_TRAP end if op==2 then type=TYPE_TRAP end
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE+LOCATION_HAND,0,nil,type) local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil,type)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_RELEASE)
local sg=g:Select(1-tp,1,1,nil) local sg=g:Select(1-tp,1,1,nil)
......
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