Commit 6ac35b04 authored by nanahira's avatar nanahira

Merge branch 'master' of git.moenext.com:mycard/ygopro-scripts-888 into develop

parents 97f5731a e79998f7
# 关于本项目
本项目用于上传脚本机制到超先行888服。
# 上传流程
对于不影响 ocgcore 或者 ygopro 主程序的脚本机制测试,步骤如下“”
1. (可选但建议)在 https://github.com/Fluorohydride/ygopro-scripts 提交相关的脚本 PR。
2. 把 PR 的分支合并到 https://code.moenext.com/mycard/ygopro-scripts-888 (本项目)内。
3. 在https://code.moenext.com/mycard/pre-release-database-cdb 创建 script-fix-xxx.cdb 列出正在测试的卡。
完成上述步骤后,ygopro-scripts-888 分支和正式脚本库的差异部分,会自动更新到 888 服务器。
每次 YGOPro 正式更新,需要把 ygopro-scripts-888 仓库 reset 到最新的正式脚本版本。
本方法测试的 BUG 进度在表格的「内核更新测试记录」标签页追踪。
\ No newline at end of file
...@@ -18,7 +18,7 @@ function c22610082.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ function c22610082.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if e:GetLabel()==0 then return false end if e:GetLabel()==0 then return false end
e:SetLabel(0) e:SetLabel(0)
return e:GetHandler():IsAbleToDeck() return not Duel.IsPlayerAffectedByEffect(tp,4130270)
end end
e:SetLabel(0) e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
......
...@@ -6,6 +6,7 @@ function c26118970.initial_effect(c) ...@@ -6,6 +6,7 @@ function c26118970.initial_effect(c)
e1:SetDescription(aux.Stringid(26118970,0)) e1:SetDescription(aux.Stringid(26118970,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL) e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,26118970) e1:SetCountLimit(1,26118970)
e1:SetCondition(c26118970.spcon) e1:SetCondition(c26118970.spcon)
......
...@@ -22,7 +22,7 @@ function c31759689.initial_effect(c) ...@@ -22,7 +22,7 @@ function c31759689.initial_effect(c)
e3:SetDescription(aux.Stringid(31759689,1)) e3:SetDescription(aux.Stringid(31759689,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_POSITION) e3:SetCategory(CATEGORY_POSITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c31759689.poscon) e3:SetCondition(c31759689.poscon)
e3:SetTarget(c31759689.postg) e3:SetTarget(c31759689.postg)
......
...@@ -72,6 +72,7 @@ function s.repfilter(c,tp) ...@@ -72,6 +72,7 @@ function s.repfilter(c,tp)
end end
function s.spcostfilter(c) function s.spcostfilter(c)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED)
end end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -58,7 +58,6 @@ function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,7 +58,6 @@ function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=g:GetFirst() local tc=g:GetFirst()
local te=tc.killer_tune_be_material_effect local te=tc.killer_tune_be_material_effect
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetProperty(te:GetProperty())
Duel.ClearTargetCard() Duel.ClearTargetCard()
e:SetLabelObject(te) e:SetLabelObject(te)
local tg=te:GetTarget() local tg=te:GetTarget()
......
...@@ -9,4 +9,11 @@ function c4130270.initial_effect(c) ...@@ -9,4 +9,11 @@ function c4130270.initial_effect(c)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_ONFIELD)) e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_ONFIELD))
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(4130270)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
end end
--Mitsurugi Prayers --巳剣勧請
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -65,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
......
...@@ -58,6 +58,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,6 +58,7 @@ function s.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0 return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(id)~=0
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id) Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
......
...@@ -55,7 +55,7 @@ function c68396121.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c68396121.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c68396121.aclimit(e,re,tp) function c68396121.aclimit(e,re,tp)
return re:GetHandler():IsOnField() return re:GetHandler():IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c68396121.atkcon(e,tp,eg,ep,ev,re,r,rp) function c68396121.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
......
...@@ -5,16 +5,25 @@ function c7165085.initial_effect(c) ...@@ -5,16 +5,25 @@ function c7165085.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c7165085.cost)
e1:SetTarget(c7165085.target) e1:SetTarget(c7165085.target)
e1:SetOperation(c7165085.activate) e1:SetOperation(c7165085.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c7165085.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c7165085.filter(c) function c7165085.filter(c)
return c:IsFacedown() and c:GetSequence()~=5 return c:IsFacedown() and c:GetSequence()~=5
end end
function c7165085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c7165085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c7165085.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and c7165085.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return not Duel.IsPlayerAffectedByEffect(tp,4130270) and Duel.IsExistingTarget(c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler())
end
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
Duel.SelectTarget(tp,c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler()) Duel.SelectTarget(tp,c7165085.filter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler())
......
...@@ -5,6 +5,8 @@ function c81171949.initial_effect(c) ...@@ -5,6 +5,8 @@ function c81171949.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c81171949.cost)
e1:SetTarget(c81171949.target)
e1:SetOperation(c81171949.activate) e1:SetOperation(c81171949.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--remove --remove
...@@ -18,6 +20,19 @@ function c81171949.initial_effect(c) ...@@ -18,6 +20,19 @@ function c81171949.initial_effect(c)
e2:SetOperation(c81171949.rmop) e2:SetOperation(c81171949.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c81171949.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c81171949.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return not Duel.IsPlayerAffectedByEffect(tp,4130270)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c81171949.activate(e,tp,eg,ep,ev,re,r,rp) function c81171949.activate(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) then
......
...@@ -1646,7 +1646,17 @@ end ...@@ -1646,7 +1646,17 @@ end
---|"'Equal'" ---|"'Equal'"
---@return boolean ---@return boolean
function Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal) function Auxiliary.RitualCheck(g,tp,c,lv,greater_or_equal)
return Auxiliary["RitualCheck"..greater_or_equal](g,c,lv) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp)) -- Check if there's space to summon
if c:IsLocation(LOCATION_EXTRA) then
if Duel.GetLocationCountFromEx(tp,tp,g,c)<=0 then
return false
end
else
if Duel.GetMZoneCount(tp,g,tp)<=0 then
return false
end
end
return Auxiliary["RitualCheck"..greater_or_equal](g,c,lv) and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not Auxiliary.RCheckAdditional or Auxiliary.RCheckAdditional(tp,g,c)) and (not Auxiliary.RCheckAdditional or Auxiliary.RCheckAdditional(tp,g,c))
end end
function Auxiliary.RitualCheckAdditionalLevel(c,rc) function Auxiliary.RitualCheckAdditionalLevel(c,rc)
...@@ -2195,7 +2205,7 @@ FusionSpell = {} ...@@ -2195,7 +2205,7 @@ FusionSpell = {}
--- A check function for Fusion FCheckAdditional/FGoalCheckAdditional. --- A check function for Fusion FCheckAdditional/FGoalCheckAdditional.
--- Parameters: --- Parameters:
--- • tp integer — player ID (0 or 1) --- • tp integer — player ID (0 or 1)
--- • mg Group — selected materials from fusion spell, excluding materials from Chain Material or EXTRA_FUSION_MATERIAL --- • mg Group — selected materials from fusion spell, exclude materials from Chain Material or EXTRA_FUSION_MATERIAL
--- • fc Card — the Fusion Monster being summoned --- • fc Card — the Fusion Monster being summoned
--- • mg_all Group — all selected materials --- • mg_all Group — all selected materials
--- • e Effect — the fusion effect object --- • e Effect — the fusion effect object
...@@ -2213,8 +2223,7 @@ FusionSpell = {} ...@@ -2213,8 +2223,7 @@ FusionSpell = {}
--- Location(s) to look for materials before knowing which ones will be used. --- Location(s) to look for materials before knowing which ones will be used.
--- Defaults to `LOCATION_HAND | LOCATION_MZONE`. --- Defaults to `LOCATION_HAND | LOCATION_MZONE`.
--- @field pre_select_mat_location? integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION --- @field pre_select_mat_location? integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION
--- Specifies handling operations for Fusion Materials in designated locations. --- List of operations to perform on materials based on location.
--- Matches locations in list order, executes the first valid operation, then stops processing.
--- Defaults to: --- Defaults to:
--- ```lua --- ```lua
--- { --- {
...@@ -2223,7 +2232,7 @@ FusionSpell = {} ...@@ -2223,7 +2232,7 @@ FusionSpell = {}
--- } --- }
--- ``` --- ```
--- @field mat_operation_code_map? {[integer]:FUSION_OPERATION_CODE}[] --- @field mat_operation_code_map? {[integer]:FUSION_OPERATION_CODE}[]
--- Extra location(s) to look for materials after some of them have been selected. --- Location(s) to look for materials after they've been selected.
--- @field post_select_mat_location? integer --- @field post_select_mat_location? integer
--- Optional quick check to validate the selected material group. --- Optional quick check to validate the selected material group.
--- @field additional_fcheck? FUSION_FGCHECK_FUNCTION --- @field additional_fcheck? FUSION_FGCHECK_FUNCTION
...@@ -2242,7 +2251,7 @@ FusionSpell = {} ...@@ -2242,7 +2251,7 @@ FusionSpell = {}
--- @field extra_target? fun(e:Effect, tp:integer, eg:Group, ep:integer, ev:integer, re:Effect, r:integer, rp:integer, chk:integer):nil --- @field extra_target? fun(e:Effect, tp:integer, eg:Group, ep:integer, ev:integer, re:Effect, r:integer, rp:integer, chk:integer):nil
--- Opponent-side locations to search for materials before they are selected. --- Opponent-side locations to search for materials before they are selected.
--- @field pre_select_mat_opponent_location? integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION --- @field pre_select_mat_opponent_location? integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION
--- Opponent-side locations to search for materials after some of them have been selected. --- Opponent-side locations to search for materials after they are selected.
--- @field post_select_mat_opponent_location? integer --- @field post_select_mat_opponent_location? integer
--- Function that returns a card that must be included in the fusion materials --- Function that returns a card that must be included in the fusion materials
--- @field gc? fun(e:Effect):Card|nil --- @field gc? fun(e:Effect):Card|nil
...@@ -2253,7 +2262,7 @@ FusionSpell = {} ...@@ -2253,7 +2262,7 @@ FusionSpell = {}
--- @field fusion_spell_matfilter? FUSION_SPELL_MATFILTER_FUNCTION --- @field fusion_spell_matfilter? FUSION_SPELL_MATFILTER_FUNCTION
--- Whether skip the IsCanBeSpecialSummoned check, for クロック・リザード, default false --- Whether skip the IsCanBeSpecialSummoned check, for クロック・リザード, default false
--- @field skip_summon_check? boolean --- @field skip_summon_check? boolean
--- Whether skip the location count check, default false, used for 叛逆の堕天使, only works for cost/target function --- Whether skip the location count check, default false, used for 叛逆の堕天使, only works for target function
--- @field skip_location_count_check? boolean --- @field skip_location_count_check? boolean
...@@ -3005,10 +3014,8 @@ end ...@@ -3005,10 +3014,8 @@ end
-- different stage for call back -- different stage for call back
---@alias FUSION_SPELL_CALLBACK_STAGE integer ---@alias FUSION_SPELL_CALLBACK_STAGE integer
-- Right before the Fusion Monster is officially summoned -- Right before the Fusion Monster is officially summoned
-- Called before Duel.SpecialSummonComplete()
FusionSpell.STAGE_BEFORE_SUMMON_COMPLETE=1 FusionSpell.STAGE_BEFORE_SUMMON_COMPLETE=1
-- Right before the entire Fusion procedure finishes -- Right before the entire Fusion procedure finishes
-- Called before tc:CompleteProcedure()
FusionSpell.STAGE_BEFORE_PROCEDURE_COMPLETE=2 FusionSpell.STAGE_BEFORE_PROCEDURE_COMPLETE=2
-- After the summon operation succeeds -- After the summon operation succeeds
FusionSpell.STAGE_AT_SUMMON_OPERATION_FINISH=3 FusionSpell.STAGE_AT_SUMMON_OPERATION_FINISH=3
......
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