Commit 6d3b46f3 authored by Tang Xinwei's avatar Tang Xinwei
parents 140f5f54 4107230a
stages: stages:
- json - prepare
- prepare2
- pack - pack
- deploy - deploy
...@@ -27,9 +28,22 @@ variables: ...@@ -27,9 +28,22 @@ variables:
# - cd .. # - cd ..
# - exit $(cat dist/redtext.txt | wc -l) # - exit $(cat dist/redtext.txt | wc -l)
json: merge_databases:
stage: json stage: prepare
dependencies: [] dependencies: []
tags:
- linux
script:
- apt update && apt -y install sqlite3
- ls cdbs/test-release.cdb | xargs -I '{}' sqlite3 '{}' .dump | sqlite3 test-release.cdb
artifacts:
paths:
- test-release.cdb
json:
stage: prepare2
dependencies:
- merge_databases
tags: tags:
- linux - linux
image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86 image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86
...@@ -52,6 +66,7 @@ json: ...@@ -52,6 +66,7 @@ json:
pack: pack:
stage: pack stage: pack
dependencies: dependencies:
- merge_databases
- json - json
tags: tags:
- linux - linux
...@@ -77,7 +92,8 @@ pack: ...@@ -77,7 +92,8 @@ pack:
server: server:
stage: pack stage: pack
dependencies: [] dependencies:
- merge_databases
tags: tags:
- linux - linux
script: script:
...@@ -116,6 +132,12 @@ upload_data: ...@@ -116,6 +132,12 @@ upload_data:
only: only:
- tags - tags
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
deploy: deploy:
stage: deploy stage: deploy
dependencies: dependencies:
...@@ -139,10 +161,12 @@ deploy: ...@@ -139,10 +161,12 @@ deploy:
.deploy_to_server: .deploy_to_server:
stage: deploy stage: deploy
dependencies:
- server
tags: tags:
- linux - linux
dependencies:
- server
variables:
SERVER_PATH: ~/ygopro-super-pre/expansions
script: script:
- apt update && apt -y install openssh-client rsync coreutils - apt update && apt -y install openssh-client rsync coreutils
- mkdir ~/.ssh - mkdir ~/.ssh
...@@ -150,7 +174,7 @@ deploy: ...@@ -150,7 +174,7 @@ deploy:
- ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts - ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts
- echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa - echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/* - chmod 600 ~/.ssh/*
- rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:~/ygopro-super-pre/expansions - rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH
only: only:
- master - master
- tags - tags
......
...@@ -20,7 +20,7 @@ function s.initial_effect(c) ...@@ -20,7 +20,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,id+o) e3:SetCountLimit(1,id+o)
e3:SetCondition(s.spcon) e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
...@@ -66,7 +66,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) return e:GetHandler():IsReason(REASON_DESTROY)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsCode(23015896) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(23015896) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--幻奏の歌姫ルフラン --幻奏的歌姬 露芙兰
function c101204009.initial_effect(c) function c101204009.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -55,7 +55,7 @@ function c101204009.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c101204009.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c101204009.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() local tg=Duel.SelectMatchingCard(tp,c101204009.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tg and Duel.SendtoGrave(tg,REASON_COST)~=0 then if tg and Duel.SendtoGrave(tg,REASON_COST)~=0 and tg:IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -93,7 +93,7 @@ function c101204009.pentg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -93,7 +93,7 @@ function c101204009.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101204009.penop(e,tp,eg,ep,ev,re,r,rp) function c101204009.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
\ No newline at end of file
...@@ -47,7 +47,7 @@ function c101204018.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,7 +47,7 @@ function c101204018.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101204018.spop(e,tp,eg,ep,ev,re,r,rp) function c101204018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c101204018.filter(c,e,tp) function c101204018.filter(c,e,tp)
......
--肃声的龙神 萨菲拉
function c101204034.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101204034,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,101204034)
e1:SetCondition(c101204034.drcon)
e1:SetTarget(c101204034.drtg)
e1:SetOperation(c101204034.drop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204034,1))
e2:SetCategory(CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101204134)
e2:SetCondition(c101204034.hscon)
e2:SetTarget(c101204034.hstg)
e2:SetOperation(c101204034.hsop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204034,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,101204234)
e3:SetCondition(c101204034.thcon)
e3:SetTarget(c101204034.thtg)
e3:SetOperation(c101204034.thop)
c:RegisterEffect(e3)
end
function c101204034.cfilter(c)
return c:IsFaceupEx() and c:IsCode(101203019)
end
function c101204034.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and Duel.IsExistingMatchingCard(c101204034.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function c101204034.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c101204034.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,2,REASON_EFFECT)==2 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function c101204034.filter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_WARRIOR)) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c101204034.hscon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return c101204034.filter(a) or (d and c101204034.filter(d))
end
function c101204034.hstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,1)
end
function c101204034.hsop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
function c101204034.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c101204034.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c101204034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101204034.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c101204034.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101204034.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
...@@ -27,7 +27,7 @@ function s.initial_effect(c) ...@@ -27,7 +27,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+o) e1:SetCountLimit(1,id+o)
e3:SetTarget(s.sptg1) e3:SetTarget(s.sptg1)
e3:SetOperation(s.spop1) e3:SetOperation(s.spop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -20,7 +20,7 @@ function c101204039.initial_effect(c) ...@@ -20,7 +20,7 @@ function c101204039.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_ATTACK+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101204140+EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,101204039+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c101204039.spcon2) e2:SetCondition(c101204039.spcon2)
e2:SetCost(c101204039.spcost2) e2:SetCost(c101204039.spcost2)
e2:SetTarget(c101204039.sptg2) e2:SetTarget(c101204039.sptg2)
......
...@@ -61,8 +61,7 @@ function c101204059.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,8 +61,7 @@ function c101204059.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101204059.atkcon(e,tp,eg,ep,ev,re,r,rp) function c101204059.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
return Duel.GetTurnPlayer()==tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c101204059.atkfilter(c) function c101204059.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON)
......
--粛声なる祝福
function c101204062.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101204062,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101204062)
e2:SetTarget(c101204062.thtg)
e2:SetOperation(c101204062.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101204062,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101204162)
e3:SetCondition(c101204062.ricon)
e3:SetTarget(c101204062.ritg)
e3:SetOperation(c101204062.riop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c101204062.filter(c,e,tp)
return not c:IsCode(101204062) and c:IsFaceupEx() and c:IsSetCard(0x2a6) and c:IsAbleToHand()
end
function c101204062.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c101204062.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101204062.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectTarget(tp,c101204062.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if tc:IsLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
else
e:SetCategory(CATEGORY_TOHAND)
end
end
function c101204062.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c101204062.cfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_RITUAL)
end
function c101204062.ricon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101204062.cfilter,1,nil)
end
function c101204062.rfilter(c,e,tp)
return c:IsType(TYPE_RITUAL) and (c:IsRace(RACE_DRAGON) or c:IsRace(RACE_WARRIOR)) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c101204062.ritg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,c101204062.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101204062.riop(e,tp,eg,ep,ev,re,r,rp)
::cancel::
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,c101204062.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat then goto cancel end
tc:SetMaterial(mat)
local lv=mat:GetSum(Card.GetLevel)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
if Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(101204062,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:CompleteProcedure()
end
Duel.SpecialSummonComplete()
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