ADDED expansions/script/c896311391.lua Index: expansions/script/c896311391.lua ================================================================== --- /dev/null +++ expansions/script/c896311391.lua @@ -0,0 +1,126 @@ +--サモン・ソーサレス +function c896311391.initial_effect(c) + --link summon + aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkType,TYPE_TOKEN)),2,99,c896311391.lcheck) + c:EnableReviveLimit() + --special summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(896311391,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetProperty(EFFECT_FLAG_DELAY) + e1:SetCondition(c896311391.spcon1) + e1:SetTarget(c896311391.sptg1) + e1:SetOperation(c896311391.spop1) + c:RegisterEffect(e1) + --special summon + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(896311391,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,896311391) + e2:SetTarget(c896311391.sptg2) + e2:SetOperation(c896311391.spop2) + c:RegisterEffect(e2) +end +function c896311391.lcheck(g) + return g:GetClassCount(Card.GetLinkRace)==1 +end +function c896311391.spcon1(e,tp,eg,ep,ev,re,r,rp) + return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) +end +function c896311391.spfilter1(c,e,tp,zone) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp,zone) +end +function c896311391.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) + local zone=e:GetHandler():GetLinkedZone(1-tp) + if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 + and Duel.IsExistingMatchingCard(c896311391.spfilter1,tp,LOCATION_HAND,0,1,nil,e,tp,zone) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) +end +function c896311391.spop1(e,tp,eg,ep,ev,re,r,rp) + local zone=e:GetHandler():GetLinkedZone(1-tp) + if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,c896311391.spfilter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone) + if g:GetCount()>0 then + Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE,zone) + end +end +function c896311391.spfilter2(c,e,tp,lg) + return c:IsFaceup() and lg:IsContains(c) and Duel.IsExistingMatchingCard(c896311391.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetRace()) +end +function c896311391.spfilter_chkc(c,e,tp,lg,rc) + return c:IsFaceup() and lg:IsContains(c) and (c:GetRace()&rc)==rc +end +function c896311391.spfilter3(c,e,tp,rac) + if not c:IsRace(rac) then return false end + local ok=false + for p=0,1 do + local zone=e:GetHandler():GetLinkedZone(p)&0xff + ok=ok or (Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,p,zone)) + end + return ok +end +function c896311391.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + local zone={} + zone[0]=c:GetLinkedZone(0) + zone[1]=c:GetLinkedZone(1) + local lg=c:GetLinkedGroup() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c896311391.spfilter_chkc(chkc,e,tp,lg,e:GetLabel()) end + if chk==0 then return Duel.IsExistingTarget(c896311391.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,lg) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + local g=Duel.SelectTarget(tp,c896311391.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,lg) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + e:SetLabel(g:GetFirst():GetRace()) +end +function c896311391.spop2(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end + local zone={} + local flag={} + for p=0,1 do + zone[p]=c:GetLinkedZone(p)&0xff + local _,flag_tmp=Duel.GetLocationCount(p,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone[p]) + flag[p]=(~flag_tmp)&0x7f + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,c896311391.spfilter3,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetRace()) + local sc=g:GetFirst() + if sc then + local avail_zone=0 + for p=0,1 do + if sc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,p,zone[p]) then + avail_zone=avail_zone|(flag[p]<<(p==tp and 0 or 16)) + end + end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) + local sel_zone=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0x00ff00ff&(~avail_zone)) + local sump=0 + if sel_zone&0xff>0 then + sump=tp + else + sump=1-tp + sel_zone=sel_zone>>16 + end + if Duel.SpecialSummonStep(sc,0,tp,sump,false,false,POS_FACEUP_DEFENSE,sel_zone) then + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_DISABLE) + e1:SetReset(RESET_EVENT+RESETS_STANDARD) + sc: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) + sc:RegisterEffect(e2) + end + Duel.SpecialSummonComplete() + end +end ADDED single/0.lua Index: single/0.lua ================================================================== --- /dev/null +++ single/0.lua @@ -0,0 +1,47 @@ +--[[message +卡数:17 +规则:新大师 +]] +Debug.SetAIName("QB20180206音响电子界") +Debug.ReloadFieldBegin(DUEL_ATTACK_FIRST_TURN+DUEL_PSEUDO_SHUFFLE+DUEL_SIMPLE_AI,4) +Debug.SetPlayerInfo(0,100,0,0) +Debug.SetPlayerInfo(1,8500,0,0) + + + +--自己的怪兽区 +Debug.AddCard(11801343,0,0,LOCATION_MZONE,1,POS_FACEUP_ATTACK) --垃圾收集员 +Debug.AddCard(50366775,0,0,LOCATION_MZONE,2,POS_FACEUP_ATTACK) --格式弹涂鱼 +Debug.AddCard(15341821,0,0,LOCATION_MZONE,3,POS_FACEUP_ATTACK) --蒲公英狮 +--对方的怪兽区 +Debug.AddCard(98234196,1,1,LOCATION_MZONE,0,POS_FACEUP_DEFENSE) --隆隆隆石人 +Debug.AddCard(98234196,1,1,LOCATION_MZONE,1,POS_FACEUP_DEFENSE) --时钟共鸣者 +Debug.AddCard(98234196,1,1,LOCATION_MZONE,3,POS_FACEUP_DEFENSE) --暗黑共鸣者 +--自己的魔陷区 +--对方的魔陷区 +--自己的手卡 +Debug.AddCard(12525049,0,0,LOCATION_HAND,4,POS_FACEUP_ATTACK) --音响战士 吉他手 +Debug.AddCard(31826057,0,0,LOCATION_HAND,2,POS_FACEUP_ATTACK) --音响战士 钢琴 +Debug.AddCard(68933343,0,0,LOCATION_HAND,3,POS_FACEUP_ATTACK) --音响战士 贝司手 +Debug.AddCard(43583400,0,0,LOCATION_HAND,1,POS_FACEUP_ATTACK) --抗锯齿星人 +Debug.AddCard(49919798,0,0,LOCATION_HAND,5,POS_FACEUP_ATTACK) --音响战士 合成器 +--对方的手卡 +--自己的墓地 +--对方的墓地 +--自己除外的卡 +--对方除外的卡 +--自己的卡组 +Debug.AddCard(94331452,0,0,LOCATION_DECK,0,POS_FACEUP_ATTACK) --音响战士 架子鼓 +Debug.AddCard(5399521,0,0,LOCATION_DECK,0,POS_FACEUP_ATTACK) --音响战士 麦克风 +Debug.AddCard(34492631,0,0,LOCATION_DECK,0,POS_FACEUP_ATTACK) --废品巨人 +Debug.AddCard(7445307,0,0,LOCATION_DECK,0,POS_FACEUP_ATTACK) --双汇编亚龙 +Debug.AddCard(15066114,0,0,LOCATION_DECK,0,POS_FACEUP_ATTACK) --分段龙 +--对方的卡组 +--自己的额外 +Debug.AddCard(22423493,0,0,LOCATION_EXTRA,0,POS_FACEDOWN_ATTACK) --机壳守护神 路径灵 +Debug.AddCard(896311391,0,0,LOCATION_EXTRA,0,POS_FACEDOWN_ATTACK) --召唤女巫 +Debug.AddCard(70902743,0,0,LOCATION_EXTRA,0,POS_FACEDOWN_ATTACK) --红莲魔龙 +Debug.AddCard(64880894,0,0,LOCATION_EXTRA,0,POS_FACEDOWN_ATTACK) --星尘充能战士 + +Debug.ReloadFieldEnd() +aux.BeginPuzzle() Index: single_doc/残局名称.md ================================================================== --- single_doc/残局名称.md +++ single_doc/残局名称.md @@ -28,14 +28,16 @@ * 主要是一些成系列的局。 ## 简化版 -* 一个典型的简化版局名是:简化版_00_000_000。 -先看第一组0: +* 一个典型的简化版局名是:简化版_00_000_000 。 +先看第一组 0 : 规则参数; -被汰局,或正式局。 -再看第二组0: -全局的卡量在前两位数乘以8再加7以下; -对方的卡量在最后一位数乘以3再加2以下。 -再看第三组0: +核心局( 0 ),或普通局( 1 )。 +再看第二组 0 ,先把这一组 0 之第一个 0 设为 x1 ,第二个 0 设为 x2 ,第三个 0 设为 x3 。 +则—— +全局的卡量小于: x1 * 64 + 63; +全局的卡量小于: x1 * 64 + x2 * 8 + 7; +对方的卡量小于: x3 * 3 + 2。 +再看第三组 0 : 八进制序数。