Commit 4d9b2002 authored by Crescent/毛虫's avatar Crescent/毛虫

clean

parent ecfc8e4d
Pipeline #28946 failed with stages
in 33 seconds
stages:
- prepare
- prepare2
- pack
- deploy
variables:
GIT_DEPTH: "1"
# redtext:
# stage: pack
# dependencies: []
# tags:
# - linux
# image: git-registry.mycard.moe/nanahira/srvpro:lite
# variables:
# DATABASE_FILE: expansions/test-release.cdb
# script:
# - apt update && apt -y install sqlite3
# - mv /ygopro-server/ygopro .
# - mkdir dist
# - cd ygopro
# - mkdir -p expansions
# - mv ../script expansions/
# - mv ../*.cdb expansions
# - echo "# Result of redtext test of commit $CI_COMMIT_SHA"
# - echo "select id from datas where type != 0x10 and (type & 0x4000) = 0;" | sqlite3 $DATABASE_FILE | xargs -I {} ./ygopro {} 2>&1 | tee ../dist/redtext.txt
# - cd ..
# - exit $(cat dist/redtext.txt | wc -l)
merge_databases:
stage: prepare
dependencies: []
tags:
- linux
script:
- apt update && apt -y install sqlite3
- ls -1 *.cdb | sed -e '/test-update.cdb/d' -e '/script-fix.cdb/d' | xargs -I '{}' sqlite3 '{}' .dump | sqlite3 test-release.cdb || true
artifacts:
paths:
- test-release.cdb
.json:
stage: prepare2
dependencies:
- merge_databases
tags:
- linux
image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86
variables:
YGOPRO_PIC_URL_PREFIX: 'https://cdn02.moecube.com:444/ygopro-super-pre/data/pics/'
YGOPRO_PIC_URL_SUFFIX: '.jpg'
FIELDS: 'name,desc,overallString,picUrl'
GIT_DEPTH: '1000'
OUTPUT_FILENAME: test-release.json
REF_COMMIT: '5.26' # 更新的时候改这里,修改成上一个tag的版本号
script:
- apt update;apt -y install wget
- currentPath=$PWD
- cd /usr/src/app
- wget -O strings.conf https://code.mycard.moe/mycard/ygopro-database/-/raw/master/locales/zh-CN/strings.conf
- env GIT_PATH=$currentPath node dist $currentPath/test-release.cdb ./strings.conf $currentPath/test-strings.conf > $currentPath/$OUTPUT_FILENAME
- cd $currentPath
artifacts:
paths:
- test-release.json
json:
extends: .json
json2:
extends: .json
variables:
FIELDS: 'id,name,desc,overallString,picUrl,createTime,createCommit,updateTime,updateCommit,created,updated'
OUTPUT_FILENAME: test-release-v2.json
artifacts:
paths:
- test-release-v2.json
neos:
stage: pack
dependencies:
- merge_databases
tags:
- linux
script:
- apt update && apt -y install sqlite3
- mkdir neos
- sqlite3 test-release.cdb .dump >> ygopro-super-pre-neos.sql
- sqlite3 test-update.cdb .dump >> ygopro-super-pre-neos.sql
- wget -O cards.cdb https://code.mycard.moe/mycard/ygopro-database/-/raw/master/locales/zh-CN/cards.cdb
- sqlite3 cards.cdb .dump >> ygopro-super-pre-neos.sql
- cat ygopro-super-pre-neos.sql | sqlite3 neos/ygopro-super-pre-neos.cdb || true
artifacts:
paths:
- neos
pack:
stage: pack
dependencies:
- merge_databases
- json
- json2
tags:
- linux
script:
- mkdir -p data archive
- mv test-release.cdb data/
- mv test-update.cdb data/
- mv pics data/
- mv script data/
- mv *.conf data/
- mv pack data/
- mv *.ini data/
- mv test-release.json data/
- mv test-release-v2.json data/
- git show -s --format=%ct $CI_COMMIT_SHA > data/version.txt
- cd data
- 7z a -mx9 ../archive/ygopro-super-pre.zip pics script pack *.cdb *.conf *.ini
- cd ..
- mv archive/ygopro-super-pre.zip archive/ygopro-super-pre.ypk
- cp archive/ygopro-super-pre.ypk archive/ygopro-super-pre-$CI_COMMIT_REF_NAME.ypk
artifacts:
paths:
- data
- archive
server:
stage: pack
dependencies:
- merge_databases
tags:
- linux
script:
- mkdir server-dist
- mv test-release.cdb server-dist
- mv test-update.cdb server-dist
- mv *.conf server-dist
- mv script server-dist
# merge ygopro-pre-data
# - git clone --depth=1 https://code.mycard.moe/mycard/ygopro-pre-data
# - mv ygopro-pre-data/expansions/* server-dist/
# - mv ygopro-pre-data/script/* server-dist/script/
artifacts:
paths:
- server-dist
.minio:
stage: deploy
dependencies:
- pack
tags:
- linux
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync $uploadDir/ s3://mycard/ygopro-super-pre/$uploadDir
upload_archive:
extends: .minio
variables:
uploadDir: archive
only:
- tags
upload_data:
extends: .minio
variables:
uploadDir: data
only:
- tags
upload_neos:
extends: .minio
variables:
uploadDir: neos
dependencies:
- neos
only:
- master
upload_version_json:
extends: .minio
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/version.txt s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/version.txt
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release.json
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release-v2.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release-v2.json
deploy:
stage: deploy
dependencies:
- pack
tags:
- linux
variables:
username: $MYCARD_USERNAME
password: $MYCARD_PASSWORD
appVersion: $CI_COMMIT_REF_NAME
script:
- apt update; apt -y install tar zstd curl jq
- git clone https://code.mycard.moe/mycard/mycard-package-script
- cd mycard-package-script
- ./index.sh makeBuild ygopro-super-pre ../data || true
- ./index.sh makeBuild ygopro2-super-pre ../data || true
- cd ..
only:
# - master
- tags
.deploy_to_server:
stage: deploy
tags:
- linux
dependencies:
- server
variables:
SERVER_PATH: ~/ygopro-super-pre/expansions
script:
- apt update && apt -y install openssh-client rsync coreutils
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts
- echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/*
- rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH
only:
- master
- tags
deploy_to_tiramisu:
extends: .deploy_to_server
variables:
SERVER_HOST: tiramisu.mycard.moe
SERVER_USER: mycard
deploy_to_koishi:
extends: .deploy_to_server
variables:
SERVER_HOST: koishi.momobako.com
SERVER_USER: nanahira
File added
--ネオ・カイザ・シーホース
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,89631139)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--level change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+o*2)
e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsCode(89631139)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.filter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_TUNER)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and tc:IsRelateToEffect(e) then
local op=0
if tc:IsLevel(1) then op=1
else op=aux.SelectFromOptions(tp,
{true,aux.Stringid(id,3),1},
{true,aux.Stringid(id,4),-1})
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(op)
tc:RegisterEffect(e1)
end
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.tgfilter(c)
return (c:IsSetCard(0xdd) or aux.IsCodeListed(c,89631139)) and c:IsAbleToGrave() and not c:IsCode(id) and c:IsType(TYPE_MONSTER)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--白き龍の威光
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,89631139)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--spsummon
local e2=aux.AddRitualProcEqual2(c,nil,nil,nil,s.mfilter,true)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id+o)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
c:RegisterEffect(e2)
end
function s.chkfilter(c)
return c:IsFaceupEx() and c:IsCode(89631139)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil)
local ct=math.min(3,math.min(dg:GetCount(),g:GetCount()))
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local rg=g:Select(tp,1,ct,nil)
if rg:GetCount()>0 then
local hg=rg:Filter(Card.IsLocation,nil,LOCATION_HAND)
local og=rg-hg
Duel.ConfirmCards(1-tp,hg)
Duel.HintSelection(og)
if hg:GetCount()>=1 then
Duel.ShuffleHand(tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,rg:GetCount(),rg:GetCount(),nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
function s.mfilter(c,e,tp,chk)
return (not chk or c~=e:GetHandler()) and c:IsCode(89631139)
end
\ No newline at end of file
--青き眼の精霊
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,24382602)
--link summon
aux.AddLinkProcedure(c,s.mfilter,1,1)
c:EnableReviveLimit()
--to hand or grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
e1:SetCondition(s.condition)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(s.splimit)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.mfilter(c)
return (c:IsLinkRace(RACE_DRAGON) or c:IsLinkRace(RACE_SPELLCASTER)) and c:IsLevelBelow(4)
end
function s.cfilter(c)
return c:IsCode(24382602) and (c:IsAbleToHand() or c:IsAbleToGrave())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsRace(RACE_DRAGON)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetMatchingGroupCount(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,e,tp)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and tc:IsSummonLocation(LOCATION_GRAVE) and tc:IsType(TYPE_EFFECT) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--紅涙の魔ラクリモーサ
local s,id,o=GetID()
function s.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.tgfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x1b0) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsSetCard(0x1b0)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
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