From 36952b7c1661d9fe50e7c44a3a41d8057b08b1cf Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 18 Nov 2023 21:56:27 +0200 Subject: [PATCH] Added new cards' scripts --- pre-release/c100296003.lua | 73 +++++++++++++++++++++++ pre-release/c100304018.lua | 117 +++++++++++++++++++++++++++++++++++++ pre-release/c100304019.lua | 86 +++++++++++++++++++++++++++ 3 files changed, 276 insertions(+) create mode 100644 pre-release/c100296003.lua create mode 100644 pre-release/c100304018.lua create mode 100644 pre-release/c100304019.lua diff --git a/pre-release/c100296003.lua b/pre-release/c100296003.lua new file mode 100644 index 0000000000..4081876999 --- /dev/null +++ b/pre-release/c100296003.lua @@ -0,0 +1,73 @@ +--合体術式-エンゲージ・ゼロ +--Combination Maneuver - Engage Zero +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Can only Special Summon "Combination Maneuver - Engage Zero(s)" once per turn + c:SetSPSummonOnce(id) + --Link Summon procedure + Link.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_LIGHT|ATTRIBUTE_DARK),2,2) + --Cannot be used as Link Material + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) + e0:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) + e0:SetValue(1) + c:RegisterEffect(e0) + --Negate the effects of a monster with 2500 or more ATK + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_DISABLE) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetTarget(s.distg) + e1:SetOperation(s.disop) + c:RegisterEffect(e1) + --Destroy all monsters your opponent controls + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_START) + e2:SetCondition(s.descon) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SKY_STRIKER_ACE} +s.listed_names={26077387,37351133,id} +function s.disfilter(c) + return c:IsNegatableMonster() and c:IsAttackAbove(2500) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE) + local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0) +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsFaceup() and tc:IsRelateToEffect(e) then + --Negate its effects + tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END) + end +end +function s.descon(e,tp,eg,ep,ev,re,r,rp) + return Duel.GetAttacker()==e:GetHandler() + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,26077387) + and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,37351133) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/pre-release/c100304018.lua b/pre-release/c100304018.lua new file mode 100644 index 0000000000..40dfa718d5 --- /dev/null +++ b/pre-release/c100304018.lua @@ -0,0 +1,117 @@ +--未来の柱-キアノス +--Pillar of the Future - Cyanos +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + --Special Summon this card from your hand + 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,0}) + e1:SetCost(s.selfspcost) + e1:SetTarget(s.selfsptg) + e1:SetOperation(s.selfspop) + c:RegisterEffect(e1) + --Special Summon 1 "Sky Striker Ace - Roze" from your Deck or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.rozesptg) + e2:SetOperation(s.rozespop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) + --Add to your hand or Special Summon 1 of your "Sky Striker Ace - Roze" that is banished or in your GY + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,2)) + e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) + e4:SetType(EFFECT_TYPE_IGNITION) + e4:SetRange(LOCATION_GRAVE) + e4:SetCountLimit(1,{id,2}) + e4:SetCost(aux.selfbanishcost) + e4:SetTarget(s.thsptg) + e4:SetOperation(s.thspop) + c:RegisterEffect(e4) +end +s.listed_series={SET_SKY_STRIKER} +s.listed_names={37351133} +function s.selfspcfilter(c) + return c:IsSpell() and c:IsDiscardable() +end +function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.selfspcfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end + Duel.DiscardHand(tp,s.selfspcfilter,1,1,REASON_COST|REASON_DISCARD) +end +function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND) +end +function s.selfspop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsRelateToEffect(e) then + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.rozespfilter(c,e,tp) + return c:IsCode(37351133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.rozesptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.rozespfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) +end +function s.rozespop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + --Cannot Special Summon from the Extra Deck, except Machine monsters + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetType(EFFECT_TYPE_FIELD) + e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e1:SetTargetRange(1,0) + e1:SetTarget(function(e,c) return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + --Clock Lizard check + aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalRace(RACE_MACHINE) end) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.rozespfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +function s.thspfilter(c,e,tp,ft) + return c:IsCode(37351133) and c:IsFaceup() and (c:IsAbleToHand() + or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) +end +function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + if chk==0 then return Duel.IsExistingMatchingCard(s.thspfilter,tp,LOCATION_REMOVED|LOCATION_GRAVE,0,1,nil,e,tp,ft) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED|LOCATION_GRAVE) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED|LOCATION_GRAVE) +end +function s.thspop(e,tp,eg,ep,ev,re,r,rp) + local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thspfilter),tp,LOCATION_REMOVED|LOCATION_GRAVE,0,1,1,nil,e,tp,ft):GetFirst() + if not sc then return end + aux.ToHandOrElse(sc,tp, + function() + return ft>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) + end, + function() + Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) + end, + aux.Stringid(id,4) + ) +end \ No newline at end of file diff --git a/pre-release/c100304019.lua b/pre-release/c100304019.lua new file mode 100644 index 0000000000..639ba22d8e --- /dev/null +++ b/pre-release/c100304019.lua @@ -0,0 +1,86 @@ +--閃刀姫-アザレア・テンペランス +--Sky Striker Ace - Azalea Temperance +--scripted by pyrQ +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Link Summon procedure + Link.AddProcedure(c,nil,2,4,s.lcheck) + --Must first be Link Summoned + local e0=Effect.CreateEffect(c) + e0:SetType(EFFECT_TYPE_SINGLE) + e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE) + e0:SetCode(EFFECT_SPSUMMON_CONDITION) + e0:SetRange(LOCATION_EXTRA) + e0:SetValue(aux.lnklimit) + c:RegisterEffect(e0) + --Equip an opponent's monster with 2500 or less ATK to this card + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_EQUIP) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SPSUMMON_SUCCESS) + e1:SetCountLimit(1,id) + e1:SetCost(s.eqcost) + e1:SetTarget(s.eqtg) + e1:SetOperation(s.eqop) + c:RegisterEffect(e1) + aux.AddEREquipLimit(c,nil,function(ec,c,tp) return ec:IsAttackBelow(2500) and ec:IsFaceup() end,Card.EquipByEffectAndLimitRegister,e1) + --Special Summon 1 other "Sky Striker" monster from your hand or GY + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_BATTLE_DESTROYED) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end +s.listed_series={SET_SKY_STRIKER} +function s.lcheck(g,lc,sumtype,tp) + return g:IsExists(Card.IsType,1,nil,TYPE_LINK,lc,sumtype,tp) +end +function s.eqcostfilter(c) + return c:IsSpell() and c:IsAbleToRemoveAsCost() +end +function s.eqcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.eqcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.eqcostfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.eqfilter(c) + return c:IsAttackBelow(2500) and c:IsFaceup() and c:IsAbleToChangeControler() +end +function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 + and Duel.IsExistingTarget(s.eqfilter,tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) + local g=Duel.SelectTarget(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,tp,0) +end +function s.eqop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + e:GetHandler():EquipByEffectAndLimitRegister(e,tp,tc) + end +end +function s.spfilter(c,e,tp) + return c:IsSetCard(SET_SKY_STRIKER) 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.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_GRAVE) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local c=e:GetHandler() + local exc=c:IsRelateToEffect(e) and c or nil + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_GRAVE,0,1,1,exc,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file