-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SUDA+ROTA-EN (except 叛逆者エト) * add 叛逆者エト * remove bit.band, bit.bor * Fix ライトストーム・ドラゴン (#2737) * Apply suggestions from code review Co-authored-by: Wind2009-Louse <[email protected]> * fix 叛逆者エト * Apply suggestions from code review Co-authored-by: Wind2009-Louse <[email protected]> * use aux.EffectPropertyFilter (#2764) * Fix アルカナスプレッド (#2773) * use aux.EffectPropertyFilter * Fix * Fix アルカナスプレッド --------- Co-authored-by: salix5 <[email protected]> * Fix ダーク・コンタクト (#2757) * Fix クリストロン・クラスター (#2791) 修复②效果提示语应为“回到卡组”的问题。(「水晶机巧晶簇」以外的自己的墓地·除外状态的1张「水晶机巧」卡回到卡组) --------- Co-authored-by: Wind2009-Louse <[email protected]> Co-authored-by: a597449807 <[email protected]>
- Loading branch information
1 parent
2fc0c48
commit 19da76d
Showing
100 changed files
with
8,702 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--二重融合 | ||
local s,id,o=GetID() | ||
function s.initial_effect(c) | ||
--Activate | ||
local e1=Effect.CreateEffect(c) | ||
e1:SetDescription(aux.Stringid(id,0)) | ||
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON) | ||
e1:SetType(EFFECT_TYPE_ACTIVATE) | ||
e1:SetCode(EVENT_FREE_CHAIN) | ||
e1:SetCost(s.cost) | ||
e1:SetTarget(s.target) | ||
e1:SetOperation(s.activate) | ||
c:RegisterEffect(e1) | ||
end | ||
s.fusion_effect=true | ||
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) | ||
if chk==0 then return Duel.CheckLPCost(tp,500) end | ||
Duel.PayLPCost(tp,500) | ||
end | ||
function s.filter1(c,e) | ||
return not c:IsImmuneToEffect(e) | ||
end | ||
function s.filter2(c,e,tp,m,f,chkf) | ||
return c:IsType(TYPE_FUSION) and (not f or f(c)) | ||
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) | ||
end | ||
function s.fcon(e,tp) | ||
local chkf=tp | ||
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e) | ||
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) | ||
if not res then | ||
local ce=Duel.GetChainMaterial(tp) | ||
if ce~=nil then | ||
local fgroup=ce:GetTarget() | ||
local mg2=fgroup(ce,e,tp) | ||
local mf=ce:GetValue() | ||
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf) | ||
end | ||
end | ||
return res | ||
end | ||
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) | ||
if chk==0 then return s.fcon(e,tp) end | ||
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) | ||
end | ||
function s.fop(e,tp,eg,ep,ev,re,r,rp) | ||
local chkf=tp | ||
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e) | ||
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) | ||
local mg2=nil | ||
local sg2=nil | ||
local ce=Duel.GetChainMaterial(tp) | ||
if ce~=nil then | ||
local fgroup=ce:GetTarget() | ||
mg2=fgroup(ce,e,tp) | ||
local mf=ce:GetValue() | ||
sg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf) | ||
end | ||
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then | ||
local sg=sg1:Clone() | ||
if sg2 then sg:Merge(sg2) end | ||
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) | ||
local tg=sg:Select(tp,1,1,nil) | ||
local tc=tg:GetFirst() | ||
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then | ||
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) | ||
tc:SetMaterial(mat1) | ||
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) | ||
Duel.BreakEffect() | ||
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) | ||
elseif ce~=nil then | ||
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) | ||
local fop=ce:GetOperation() | ||
fop(ce,e,tp,tc,mat2) | ||
end | ||
tc:CompleteProcedure() | ||
return 1 | ||
end | ||
return 0 | ||
end | ||
function s.activate(e,tp,eg,ep,ev,re,r,rp) | ||
if s.fop(e,tp,eg,ep,ev,re,r,rp)>0 then | ||
Duel.Readjust() | ||
if s.fcon(e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then | ||
Duel.BreakEffect() | ||
s.fop(e,tp,eg,ep,ev,re,r,rp) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--ライトストーム・ドラゴン | ||
local s,id,o=GetID() | ||
function s.initial_effect(c) | ||
--Synchro summon | ||
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) | ||
c:EnableReviveLimit() | ||
--destroy | ||
local e1=Effect.CreateEffect(c) | ||
e1:SetDescription(aux.Stringid(id,0)) | ||
e1:SetCategory(CATEGORY_DESTROY) | ||
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) | ||
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) | ||
e1:SetCode(EVENT_SPSUMMON_SUCCESS) | ||
e1:SetCountLimit(1,id) | ||
e1:SetTarget(s.destg) | ||
e1:SetOperation(s.desop) | ||
c:RegisterEffect(e1) | ||
--set | ||
local e2=Effect.CreateEffect(c) | ||
e2:SetDescription(aux.Stringid(id,1)) | ||
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) | ||
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) | ||
e2:SetCode(EVENT_DESTROYED) | ||
e2:SetCountLimit(1,id+o) | ||
e2:SetCondition(s.setcon) | ||
e2:SetTarget(s.settg) | ||
e2:SetOperation(s.setop) | ||
c:RegisterEffect(e2) | ||
end | ||
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) | ||
local ct=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_NORMAL)+1 | ||
if chkc then return chkc:IsOnField() end | ||
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end | ||
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) | ||
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil,TYPE_SPELL+TYPE_TRAP) | ||
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) | ||
end | ||
function s.desop(e,tp,eg,ep,ev,re,r,rp) | ||
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) | ||
local tg=g:Filter(Card.IsRelateToEffect,nil,e) | ||
if tg:GetCount()>0 then | ||
Duel.Destroy(tg,REASON_EFFECT) | ||
end | ||
end | ||
function s.setcon(e,tp,eg,ep,ev,re,r,rp) | ||
return r&(REASON_EFFECT+REASON_BATTLE)~=0 | ||
end | ||
function s.setfilter(c) | ||
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() | ||
end | ||
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) | ||
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.setfilter(chkc) end | ||
if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE,0,1,nil) end | ||
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) | ||
local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE,0,1,1,nil) | ||
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) | ||
end | ||
function s.setop(e,tp,eg,ep,ev,re,r,rp) | ||
local tc=Duel.GetFirstTarget() | ||
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.SSet(tp,tc)~=0 then | ||
local e1=Effect.CreateEffect(e:GetHandler()) | ||
e1:SetDescription(aux.Stringid(id,2)) | ||
e1:SetType(EFFECT_TYPE_SINGLE) | ||
e1:SetCode(EFFECT_CANNOT_TRIGGER) | ||
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) | ||
e1:SetCondition(s.actcon) | ||
e1:SetReset(RESET_EVENT+RESETS_STANDARD) | ||
tc:RegisterEffect(e1) | ||
end | ||
end | ||
function s.actfilter(c) | ||
return c:IsType(TYPE_NORMAL) and c:IsFaceup() | ||
end | ||
function s.actcon(e) | ||
local tp=e:GetHandlerPlayer() | ||
return not e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED) | ||
and not Duel.IsExistingMatchingCard(s.actfilter,tp,LOCATION_MZONE,0,1,nil) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--HSRグライダー2 | ||
local s,id,o=GetID() | ||
function s.initial_effect(c) | ||
--synchro summon | ||
aux.AddSynchroProcedure(c,s.sfilter,aux.NonTuner(nil),1) | ||
c:EnableReviveLimit() | ||
--special summon | ||
local e1=Effect.CreateEffect(c) | ||
e1:SetDescription(aux.Stringid(id,0)) | ||
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) | ||
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) | ||
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) | ||
e1:SetCode(EVENT_SPSUMMON_SUCCESS) | ||
e1:SetCountLimit(1,id) | ||
e1:SetCondition(s.spcon) | ||
e1:SetTarget(s.sptg) | ||
e1:SetOperation(s.spop) | ||
c:RegisterEffect(e1) | ||
--level up | ||
local e2=Effect.CreateEffect(c) | ||
e2:SetDescription(aux.Stringid(id,1)) | ||
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) | ||
e2:SetCode(EVENT_SPSUMMON_SUCCESS) | ||
e2:SetRange(LOCATION_GRAVE) | ||
e2:SetCountLimit(1,id+o) | ||
e2:SetProperty(EFFECT_FLAG_DELAY) | ||
e2:SetCondition(s.lvcon) | ||
e2:SetCost(aux.bfgcost) | ||
e2:SetTarget(s.lvtg) | ||
e2:SetOperation(s.lvop) | ||
c:RegisterEffect(e2) | ||
end | ||
function s.sfilter(c) | ||
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_WIND) | ||
end | ||
function s.spcon(e,tp,eg,ep,ev,re,r,rp) | ||
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) | ||
end | ||
function s.spfilter(c,e,tp) | ||
return not c:IsType(TYPE_TUNER) and c:IsType(TYPE_SYNCHRO) and c:IsLevelBelow(7) | ||
and c:IsAttribute(ATTRIBUTE_WIND) | ||
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) | ||
end | ||
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) | ||
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.GetLocationCount(tp,LOCATION_MZONE)>0 | ||
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) 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_SPECIAL_SUMMON,g,1,0,0) | ||
end | ||
function s.spop(e,tp,eg,ep,ev,re,r,rp) | ||
local tc=Duel.GetFirstTarget() | ||
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then | ||
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) | ||
end | ||
end | ||
function s.cfilter(c) | ||
return c:IsSetCard(0xff) and c:IsFaceup() | ||
end | ||
function s.lvcon(e,tp,eg,ep,ev,re,r,rp) | ||
return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) | ||
end | ||
function s.lvfilter(c) | ||
return c:IsFaceup() and c:GetLevel()>0 | ||
end | ||
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) | ||
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,0,LOCATION_MZONE,1,nil) | ||
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end | ||
end | ||
function s.lvop(e,tp,eg,ep,ev,re,r,rp) | ||
local tg=Duel.GetMatchingGroup(s.lvfilter,tp,0,LOCATION_MZONE,nil) | ||
for tc in aux.Next(tg) do | ||
local e1=Effect.CreateEffect(e:GetHandler()) | ||
e1:SetType(EFFECT_TYPE_SINGLE) | ||
e1:SetCode(EFFECT_UPDATE_LEVEL) | ||
e1:SetValue(5) | ||
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD) | ||
tc:RegisterEffect(e1) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--刻まれし魔レクストレメンデ | ||
local s,id,o=GetID() | ||
function s.initial_effect(c) | ||
--fusion material | ||
aux.AddFusionProcFun2(c,s.mfilter1,s.mfilter2,true) | ||
c:EnableReviveLimit() | ||
--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_SPSUMMON_SUCCESS) | ||
e1:SetCountLimit(1,id) | ||
e1:SetCondition(s.tgcon) | ||
e1:SetCost(s.tgcost) | ||
e1:SetTarget(s.tgtg) | ||
e1:SetOperation(s.tgop) | ||
c:RegisterEffect(e1) | ||
--immune | ||
local e2=Effect.CreateEffect(c) | ||
e2:SetType(EFFECT_TYPE_SINGLE) | ||
e2:SetCode(EFFECT_IMMUNE_EFFECT) | ||
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) | ||
e2:SetRange(LOCATION_MZONE) | ||
e2:SetCondition(s.imcon) | ||
e2:SetValue(s.efilter) | ||
c:RegisterEffect(e2) | ||
--to hand | ||
local e3=Effect.CreateEffect(c) | ||
e3:SetDescription(aux.Stringid(id,1)) | ||
e3:SetCategory(CATEGORY_TOHAND) | ||
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) | ||
e3:SetCode(EVENT_TO_GRAVE) | ||
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) | ||
e3:SetCountLimit(1,id+o) | ||
e3:SetTarget(s.thtg) | ||
e3:SetOperation(s.thop) | ||
c:RegisterEffect(e3) | ||
end | ||
function s.mfilter1(c) | ||
return c:IsFusionSetCard(0x1b0) and c:IsFusionType(TYPE_FUSION) | ||
end | ||
function s.mfilter2(c) | ||
return c:IsFusionType(TYPE_FUSION+TYPE_LINK) | ||
end | ||
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) | ||
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) | ||
end | ||
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) | ||
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end | ||
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) | ||
end | ||
function s.tgfilter(c) | ||
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FIEND) 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+LOCATION_EXTRA,0,1,nil) end | ||
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) | ||
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+LOCATION_EXTRA,0,1,1,nil) | ||
if g:GetCount()>0 then | ||
Duel.SendtoGrave(g,REASON_EFFECT) | ||
end | ||
end | ||
function s.eqfilter(c) | ||
return c:IsFaceup() and c:IsSetCard(0x1b0) and c:IsAllTypes(TYPE_SPELL+TYPE_EQUIP) | ||
end | ||
function s.imcon(e) | ||
local sg=e:GetHandler():GetEquipGroup() | ||
return sg:IsExists(s.eqfilter,1,nil) | ||
end | ||
function s.efilter(e,te) | ||
return not te:GetOwner():IsSetCard(0x1b0) | ||
end | ||
function s.thfilter(c) | ||
return c:IsFaceupEx() and c:IsSetCard(0x1b0) and c:IsAbleToHand() | ||
end | ||
function s.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 s.thfilter(chkc) and chkc~=e:GetHandler() end | ||
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end | ||
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) | ||
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler()) | ||
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) | ||
end | ||
function s.thop(e,tp,eg,ep,ev,re,r,rp) | ||
local tc=Duel.GetFirstTarget() | ||
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then | ||
Duel.SendtoHand(tc,nil,REASON_EFFECT) | ||
end | ||
end |
Oops, something went wrong.