From 4d086bc5cd70105e8474701f83afea18a66655a1 Mon Sep 17 00:00:00 2001 From: Whispered <38574940+whispered1020@users.noreply.github.com> Date: Wed, 5 Mar 2025 23:16:06 -0300 Subject: [PATCH 1/4] Fixed Whispered's cards --- users/Whispered_009/c2009000010.lua | 47 ++++++++++++++++------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/users/Whispered_009/c2009000010.lua b/users/Whispered_009/c2009000010.lua index ddfc19f..522885f 100644 --- a/users/Whispered_009/c2009000010.lua +++ b/users/Whispered_009/c2009000010.lua @@ -1,31 +1,36 @@ --Penguin Reinforcements local s,id=GetID() function s.initial_effect(c) - --spsummon + --Activate 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:SetCode(EVENT_TO_GRAVE) - e1:SetProperty(EFFECT_FLAG_DELAY) - e1:SetCountLimit(1,id) - e1:SetCondition(s.spcon) - e1:SetTarget(s.sptg) - e1:SetOperation(s.spop) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) - --Return to Deck + --spsummon local e2=Effect.CreateEffect(c) - e2:SetDescription(aux.Stringid(id,1)) - e2:SetCategory(CATEGORY_TODECK) - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) - e2:SetCode(EVENT_CHAINING) - e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) - e2:SetRange(LOCATION_SZONE) - e2:SetCountLimit(1,{id,1}) - e2:SetCondition(s.tdcon) - e2:SetTarget(s.tdtg) - e2:SetOperation(s.tdop) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCountLimit(1,id) + e2:SetCondition(s.spcon) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) c:RegisterEffect(e2) + --Return to Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) + e3:SetRange(LOCATION_SZONE) + e3:SetCountLimit(1) + e3:SetCondition(s.tdcon) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + c:RegisterEffect(e3) end s.listed_series={0x5a} --Special Summon when Penguin activates effect From e88d40a816bdb66d3ba0f34241b684fd411fa37a Mon Sep 17 00:00:00 2001 From: Whispered <38574940+whispered1020@users.noreply.github.com> Date: Sun, 1 Jun 2025 00:11:45 -0300 Subject: [PATCH 2/4] New Biome cards MORE to come --- users/Whispered_009/c2009000017.lua | 81 +++++++++++++ users/Whispered_009/c2009000018.lua | 121 +++++++++++++++++++ users/Whispered_009/c2009000019.lua | 106 +++++++++++++++++ users/Whispered_009/c2009000021.lua | 132 +++++++++++++++++++++ users/Whispered_009/c2009000022.lua | 132 +++++++++++++++++++++ users/Whispered_009/c2009000023.lua | 42 +++++++ users/Whispered_009/c2009000024.lua | 64 ++++++++++ users/Whispered_009/c2009000026.lua | 59 ++++++++++ users/Whispered_009/c2009000028.lua | 163 ++++++++++++++++++++++++++ users/Whispered_009/c2009000029.lua | 175 ++++++++++++++++++++++++++++ users/Whispered_009/c2009000030.lua | 37 ++++++ users/Whispered_009/c2009000031.lua | 76 ++++++++++++ users/Whispered_009/c2009000032.lua | 63 ++++++++++ users/Whispered_009/c2009000033.lua | 86 ++++++++++++++ 14 files changed, 1337 insertions(+) create mode 100644 users/Whispered_009/c2009000017.lua create mode 100644 users/Whispered_009/c2009000018.lua create mode 100644 users/Whispered_009/c2009000019.lua create mode 100644 users/Whispered_009/c2009000021.lua create mode 100644 users/Whispered_009/c2009000022.lua create mode 100644 users/Whispered_009/c2009000023.lua create mode 100644 users/Whispered_009/c2009000024.lua create mode 100644 users/Whispered_009/c2009000026.lua create mode 100644 users/Whispered_009/c2009000028.lua create mode 100644 users/Whispered_009/c2009000029.lua create mode 100644 users/Whispered_009/c2009000030.lua create mode 100644 users/Whispered_009/c2009000031.lua create mode 100644 users/Whispered_009/c2009000032.lua create mode 100644 users/Whispered_009/c2009000033.lua diff --git a/users/Whispered_009/c2009000017.lua b/users/Whispered_009/c2009000017.lua new file mode 100644 index 0000000..64475ae --- /dev/null +++ b/users/Whispered_009/c2009000017.lua @@ -0,0 +1,81 @@ +--Woodland Biome Oracle +local s,id=GetID() +function s.initial_effect(c) + --Discard then SpSummon 1 Level 1 Effect Plant monster + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --if sent to gy by a plant monster's effect + 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_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.sp2con) + e2:SetTarget(s.sp2tg) + e2:SetOperation(s.sp2op) + c:RegisterEffect(e2) +end +s.listed_names={2009000017} +s.listed_series={0xf19} +--Discard then SpSummon 1 Level 1 Effect Plant monster +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + --Reveal until the end of opponent's turn. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,2)) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_PUBLIC) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsRace(RACE_PLANT) and c:IsType(TYPE_EFFECT) and c:IsLevel(1) 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_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end +--When discarded SpSummon level 5 or higher plant monster +function s.sp2con(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return re and re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect() +end +function s.sp2filter(c,e,tp) + return c:IsRace(RACE_PLANT) and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.sp2filter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.sp2op(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.sp2filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000018.lua b/users/Whispered_009/c2009000018.lua new file mode 100644 index 0000000..5cd2576 --- /dev/null +++ b/users/Whispered_009/c2009000018.lua @@ -0,0 +1,121 @@ +--Desert Biome Guardian +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Discard then search + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.thcost) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --if sent to gy by a plant monster's effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DAMAGE) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.damcon) + e2:SetTarget(s.damtg) + e2:SetOperation(s.damop) + c:RegisterEffect(e2) + --Disable SpSummon + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_RELEASE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetRange(LOCATION_MZONE) + e3:SetCode(EVENT_CHAINING) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.condition) + e3:SetTarget(s.target) + e3:SetOperation(s.operation) + c:RegisterEffect(e3) +end +s.listed_names={2009000024} +s.listed_series={0xf19} +-- Discard then search +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + --Reveal until the end of opponent's turn. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_PUBLIC) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + c:RegisterEffect(e1) +end +function s.thfilter(c) + return c:IsCode(2009000024) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)>0 + then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then + end + end +end +-- if discarded, damage opponent +function s.damcon(e,tp,eg,ep,ev,re,r,rp) + return re and re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect() +end +function s.damfilter(c) + return c:IsRace(RACE_PLANT) and c:IsMonster() +end +function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.damfilter,tp,LOCATION_GRAVE,0,1,nil) end + local val=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_GRAVE,0,nil)*200 + Duel.SetTargetPlayer(1-tp) + Duel.SetTargetParam(val) + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,val) +end +function s.damop(e,tp,eg,ep,ev,re,r,rp) + local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) + local val=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_GRAVE,0,nil)*200 + Duel.Damage(p,val,REASON_EFFECT) +end +--Disable SpSummon +function s.condition(e,tp,eg,ep,ev,re,r,rp) + if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end + if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end + return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) + local rc=re:GetHandler() + if rc:IsDestructable() and rc:IsRelateToEffect(re) then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE) + end +end +function s.tributefilter(c) + return c:IsMonster() and c:IsSetCard(0xf19) and c:IsReleasableByEffect() +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) + and Duel.Destroy(eg,REASON_EFFECT)>0 and c:IsRelateToEffect(e) and c:IsFaceup() then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) + local tc=Duel.SelectMatchingCard(tp,s.tributefilter,tp,LOCATION_MZONE,0,1,1,nil) + if #tc>0 then + Duel.BreakEffect() + Duel.Release(tc,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000019.lua b/users/Whispered_009/c2009000019.lua new file mode 100644 index 0000000..9671a6f --- /dev/null +++ b/users/Whispered_009/c2009000019.lua @@ -0,0 +1,106 @@ +--Tropical Forest Biome Guardian +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Discard then search + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.thcost) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --if sent to gy by a plant monster's effect + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_DRAW) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.drcon) + e2:SetTarget(s.drtg) + e2:SetOperation(s.drop) + c:RegisterEffect(e2) + --Return both to hand + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_TOHAND) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCode(EVENT_FREE_CHAIN) + e3:SetRange(LOCATION_MZONE) + e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.rettg) + e3:SetOperation(s.retop) + c:RegisterEffect(e3) +end +s.listed_names={2009000023} +s.listed_series={0xf19} +-- Discard then search +function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + --Reveal until the end of opponent's turn. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_PUBLIC) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + c:RegisterEffect(e1) +end +function s.thfilter(c) + return c:IsCode(2009000023) and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)>0 + then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then + end + end +end +-- Draw if discarted +function s.drcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return re and re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect() +end +function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end + Duel.SetTargetPlayer(tp) + Duel.SetTargetParam(1) + Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) +end +function s.drop(e,tp,eg,ep,ev,re,r,rp) + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) + Duel.Draw(p,d,REASON_EFFECT) +end +--Return both to hand +function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + local c=e:GetHandler() + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() and chkc:IsAbleToHand() end + if chk==0 then return c:IsAbleToHand() and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_MZONE,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToHand),tp,0,LOCATION_MZONE,1,1,nil) + g:AddCard(c) + Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0) +end +function s.retop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then + local rg=Group.FromCards(c,tc) + Duel.SendtoHand(rg,nil,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000021.lua b/users/Whispered_009/c2009000021.lua new file mode 100644 index 0000000..5d70149 --- /dev/null +++ b/users/Whispered_009/c2009000021.lua @@ -0,0 +1,132 @@ +--Tropical Forest Biome Reaper +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + c:EnableReviveLimit() + --lvchange + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_LVCHANGE) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetCost(s.lvcost) + e1:SetTarget(s.lvtg) + e1:SetOperation(s.lvop) + c:RegisterEffect(e1) + --Return from the Pendulum Zone + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_PZONE) + e2:SetCondition(s.rtcon) + e2:SetTarget(s.rttg) + e2:SetOperation(s.rtop) + c:RegisterEffect(e2) + --if sent to gy by a plant monster's effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_REMOVE) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.rmvcon) + e3:SetTarget(s.rmvtg) + e3:SetOperation(s.rmvop) + c:RegisterEffect(e3) + --Negate and destroy + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,3)) + e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetCode(EVENT_CHAINING) + e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,3}) + e4:SetCondition(s.discon) + e4:SetTarget(s.distg) + e4:SetOperation(s.disop) + c:RegisterEffect(e4) +end +s.listed_names={2009000021} +s.listed_series={0xf19} +--Change revealed card Level +function s.lvcostfilter(c) + return c:IsRace(RACE_PLANT) and not c:IsPublic() +end +function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingMatchingCard(s.lvcostfilter,tp,LOCATION_HAND,0,1,c) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local g=Duel.SelectMatchingCard(tp,s.lvcostfilter,tp,LOCATION_HAND,0,1,1,c) + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + e:SetLabelObject(g:GetFirst()) +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local lv=Duel.AnnounceNumber(tp,5,6,7,8) + local g=Duel.GetMatchingGroup(s.lvcostfilter,tp,LOCATION_HAND,0,e:GetHandler()) + local tc=e:GetLabelObject() + if tc then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetValue(lv) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + end +end +--Return from the Pendulum Zone +function s.rtcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_RITUAL) +end +function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) +end +function s.rtop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + Duel.SendtoHand(c,nil,REASON_EFFECT) +end +--if sent to gy by a plant monster's effect +function s.rmvcon(e,tp,eg,ep,ev,re,r,rp) + return re and re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect() +end +function s.rmvtg(e,tp,eg,ep,ev,re,r,rp,chk) + local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) + if chk==0 then return #g>0 end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,PLAYER_EITHER,LOCATION_ONFIELD) +end +function s.rmvop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) + if #g>0 then + Duel.HintSelection(g,true) + Duel.Remove(g,POS_FACEUP,REASON_EFFECT) + end +end +--Negate and destroy +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) +end +function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) + if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then + Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000022.lua b/users/Whispered_009/c2009000022.lua new file mode 100644 index 0000000..1595cd6 --- /dev/null +++ b/users/Whispered_009/c2009000022.lua @@ -0,0 +1,132 @@ +--Tropical Forest Biome Roots +local s,id=GetID() +function s.initial_effect(c) + Pendulum.AddProcedure(c) + c:EnableReviveLimit() + --ritual level + Ritual.AddWholeLevelTribute(c,aux.FilterBoolFunction(Card.IsSetCard,0xf19)) + --Add to hand from GY + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetProperty(EFFECT_FLAG_CARD_TARGET) + e1:SetRange(LOCATION_PZONE) + e1:SetCountLimit(1,id) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + --Return from the Pendulum Zone + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetRange(LOCATION_PZONE) + e2:SetCondition(s.rtcon) + e2:SetTarget(s.rttg) + e2:SetOperation(s.rtop) + c:RegisterEffect(e2) + --if sent to gy by a plant monster's effect + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_DESTROY) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetCode(EVENT_TO_GRAVE) + e3:SetCountLimit(1,{id,2}) + e3:SetCondition(s.sgcon) + e3:SetTarget(s.sgtg) + e3:SetOperation(s.sgop) + c:RegisterEffect(e3) + --Negate and banish + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,3)) + e4:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) + e4:SetType(EFFECT_TYPE_QUICK_O) + e4:SetCode(EVENT_CHAINING) + e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e4:SetRange(LOCATION_MZONE) + e4:SetCountLimit(1,{id,3}) + e4:SetCondition(s.discon) + e4:SetCost(s.discost) + e4:SetTarget(s.distg) + e4:SetOperation(s.disop) + c:RegisterEffect(e4) +end +s.listed_names={2009000022} +s.listed_series={0xf19} + --Add to hand from GY +function s.thfilter(c) + return c:IsRace(RACE_PLANT) and c:IsRitualMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) + local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) + 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) then + Duel.SendtoHand(tc,nil,REASON_EFFECT) + end +end +--Return from the Pendulum Zone +function s.rtcon(e,tp,eg,ep,ev,re,r,rp) + return eg:IsExists(Card.IsSummonType,1,nil,SUMMON_TYPE_RITUAL) +end +function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0) +end +function s.rtop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if not c:IsRelateToEffect(e) then return end + Duel.SendtoHand(c,nil,REASON_EFFECT) +end +--if sent to gy by a plant monster's effect +function s.sgcon(e,tp,eg,ep,ev,re,r,rp) + return re and re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect() +end +function s.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end + if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) + local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) +end +function s.sgop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.Destroy(tc,REASON_EFFECT) + end +end +--Negate and banish +function s.discon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end + return Duel.IsChainNegatable(ev) and Duel.GetTurnPlayer()~=tp +end +function s.discost(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.distg(e,tp,eg,ep,ev,re,r,rp,chk) + local rc=re:GetHandler() + local relation=rc:IsRelateToEffect(re) + if chk==0 then return rc:IsAbleToRemove(tp) + or (not relation and Duel.IsPlayerCanRemove(tp)) end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) + if relation then + Duel.SetOperationInfo(0,CATEGORY_REMOVE,rc,1,rc:GetControler(),rc:GetLocation()) + else + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,0,rc:GetPreviousLocation()) + end +end +function s.disop(e,tp,eg,ep,ev,re,r,rp) + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000023.lua b/users/Whispered_009/c2009000023.lua new file mode 100644 index 0000000..167fc60 --- /dev/null +++ b/users/Whispered_009/c2009000023.lua @@ -0,0 +1,42 @@ +--Tropical Forest Biome +local s,id=GetID() +function s.initial_effect(c) + -- Activate + local e1=Effect.CreateEffect(c) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + -- Ritual Summon 1 "Biome" Ritual Monster + local e2=Ritual.CreateProc(c,RITPROC_GREATER,aux.FilterBoolFunction(Card.IsSetCard,0xf19),nil,aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetCountLimit(2,{id,1}) + e2:SetRange(LOCATION_FZONE) + c:RegisterEffect(e2) +end +s.listed_series={0xf19} +function s.thfilter(c) + return c:IsSetCard(0xf19) and c:IsMonster() and c:IsAbleToHand() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,2,2,nil) + if #dg>0 then + Duel.BreakEffect() + Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end +end diff --git a/users/Whispered_009/c2009000024.lua b/users/Whispered_009/c2009000024.lua new file mode 100644 index 0000000..0295e5c --- /dev/null +++ b/users/Whispered_009/c2009000024.lua @@ -0,0 +1,64 @@ +--Living Desert Biome +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.pztg) + e1:SetOperation(s.pzop) + c:RegisterEffect(e1) + --negate + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) + e2:SetCode(EVENT_CHAIN_SOLVING) + e2:SetRange(LOCATION_SZONE) + e2:SetCountLimit(1,id) + e2:SetCondition(s.negcon) + e2:SetOperation(s.negop) + c:RegisterEffect(e2) + aux.DoubleSnareValidity(c,LOCATION_SZONE) + --Plant monsters cannot be destroyed by card effects + local e3=Effect.CreateEffect(c) + e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) + e3:SetType(EFFECT_TYPE_FIELD) + e3:SetRange(LOCATION_SZONE) + e3:SetTargetRange(LOCATION_MZONE,0) + e3:SetTarget(s.indtg) + e3:SetValue(1) + c:RegisterEffect(e3) +end +s.listed_series={0xf19} +--Add to pendulum zone +function s.pzfilter(c) + return c:IsSetCard(0xf19) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() +end +function s.pztg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.pzfilter,tp,LOCATION_DECK,0,1,nil) + and Duel.CheckPendulumZones(tp) end +end +function s.pzop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.CheckPendulumZones(tp) then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) + local tc=Duel.SelectMatchingCard(tp,s.pzfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if tc then + Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) + end +end +--negate spell/trap once per turn +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsSetCard,0xf19),tp,LOCATION_MZONE,0,1,nil) + and rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local rc=re:GetHandler() + if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then + Duel.Destroy(rc,REASON_EFFECT) + end +end +--Cannot be destroyed by card effect +function s.indtg(e,c) + return c:IsFaceup() and c:IsRace(RACE_PLANT) +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000026.lua b/users/Whispered_009/c2009000026.lua new file mode 100644 index 0000000..a3a14ae --- /dev/null +++ b/users/Whispered_009/c2009000026.lua @@ -0,0 +1,59 @@ +--Thriving Savannah Biome +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Ritual.AddProcGreater{handler=c,filter=s.ritualfil,lvtype=RITPROC_GREATER,extrafil=s.extrafil,extratg=s.extratg} + e1:SetCountLimit(1,id) + --Activate + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetRange(LOCATION_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(aux.bfgcost) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) +end +s.listed_series={0xf19} +-- Ritual Summon +function s.ritualfil(c) + return c:IsSetCard(0xf19) and c:IsRitualMonster() +end +function s.mfilter(c) + return not Duel.IsPlayerAffectedByEffect(c:GetControler(),69832741) and c:HasLevel() and c:IsSetCard(0xf19) + and c:IsMonster() and c:IsAbleToRemove() +end +function s.extrafil(e,tp,eg,ep,ev,re,r,rp,chk) + return Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_GRAVE,0,nil) +end +function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) +end +-- Return to hand 2 "Biome" cards from GY and shuffle 1 card in your Deck +function s.thfilter(c) + return c:IsRace(RACE_PLANT) and c:IsSetCard(0xf19) 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) and chkc:IsControler(tp) and s.thfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,1,2,e:GetHandler()) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,2,nil) + if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) + if #dg>0 then + Duel.BreakEffect() + Duel.SendtoDeck(dg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) + end + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000028.lua b/users/Whispered_009/c2009000028.lua new file mode 100644 index 0000000..3929cd4 --- /dev/null +++ b/users/Whispered_009/c2009000028.lua @@ -0,0 +1,163 @@ +-- Sylvan Tropical Forest Biome Descendant +local s,id=GetID() +function s.initial_effect(c) + --Add to hand or Special Summon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.exccost) + e1:SetTarget(s.exctg) + e1:SetOperation(s.excop) + c:RegisterEffect(e1) + --If discarded add 1 "Biome" or "Sylvan" Spell/Trap from your deck to your hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetTarget(s.thtg) + e2:SetOperation(s.thop) + c:RegisterEffect(e2) + --Special Summon and return to Deck + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) + e3:SetCountLimit(1,{id,2}) + e3:SetTarget(s.tdtg) + e3:SetOperation(s.tdop) + c:RegisterEffect(e3) +end +s.listed_series={0xf19,0x90} +--Excavate +function s.exccost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + --Reveal until the end of opponent's turn. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_PUBLIC) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + c:RegisterEffect(e1) +end +function s.exctg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 and Duel.IsPlayerCanDiscardDeck(tp,1) end + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) +end +function s.thfilter(c,tp) + return c:IsMonster() and not c:IsRitualMonster() and (c:IsSetCard(0x90) or c:IsSetCard(0xf19)) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) and not c:IsLocation(LOCATION_GRAVE) +end +function s.tgfilter(c,tp) + return c:IsAbleToGrave() +end +function s.excop(e,tp,eg,ep,ev,re,r,rp) + if not Duel.IsPlayerCanDiscardDeck(tp,1) then return end + if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end + Duel.ConfirmDecktop(tp,3) + local dg=Duel.GetDecktopGroup(tp,3) + --Send 1 excavated card to the GY + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local tc=dg:FilterSelect(tp,Card.IsAbleToGrave,1,1,nil,tp):GetFirst() + if tc then + Duel.DisableShuffleCheck() + Duel.SendtoGrave(tc,REASON_EFFECT|REASON_EXCAVATE) + dg:Sub(tc) + end + local break_chk=false + --Add to hand or Special Summon 1 excavated monster + local thg=dg:Filter(s.thfilter,nil,tp) + if #thg>0 then + local thc=thg:Select(tp,1,1,nil):GetFirst() + break_chk=true + Duel.BreakEffect() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + aux.ToHandOrElse(thc,tp,function(c) + return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end, + function(c) + Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end, + aux.Stringid(id,2)) + dg:Sub(thc) + end + if break_chk then Duel.BreakEffect() end + --Return the remaining card to the top of the Deck + Duel.MoveToDeckTop(dg) +end +--Add 1 "Biome" or "Sylvan" Spell/Trap from your deck to your hand +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + return (e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsReason(REASON_EXCAVATE)) + or (re and re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect()) +end +function s.th2filter(c) + return (c:IsSetCard(0xf19) or c:IsSetCard(0x90)) and c:IsSpellTrap() and c:IsAbleToHand() and not c:IsCode(2009000023) and not c:IsType(TYPE_CONTINUOUS) +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.th2filter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.th2filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end +--Special Summon 1 "Biome" or "Sylvan" from Deck then return monsters to the top of the Deck +function s.filter(c) + return (c:IsSetCard(SET_SYLVAN) or c:IsSetCard(0xf19)) and c:IsAbleToDeck() +end +function s.spfilter(c,e,tp) + return (c:IsSetCard(0x90) or c:IsSetCard(0xf19)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,2,nil) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) +end +function s.tdop(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) + local tc=g:GetFirst() + if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then + local c=e:GetHandler() + --Negate its effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_DISABLE) + e1:SetReset(RESET_EVENT+RESETS_STANDARD) + tc:RegisterEffect(e1,true) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_DISABLE_EFFECT) + e2:SetReset(RESET_EVENT+RESETS_STANDARD) + tc:RegisterEffect(e2,true) + local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) + local sg=g:Filter(Card.IsRelateToEffect,nil,e) + if #sg>0 then + Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) + end + end + Duel.SpecialSummonComplete() + + +end + + + \ No newline at end of file diff --git a/users/Whispered_009/c2009000029.lua b/users/Whispered_009/c2009000029.lua new file mode 100644 index 0000000..035a8e3 --- /dev/null +++ b/users/Whispered_009/c2009000029.lua @@ -0,0 +1,175 @@ +--Mediterranian Biome Rose Sprite +local s,id=GetID() +function s.initial_effect(c) +--Discard then SSummon + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,id) + e1:SetCost(s.spcost) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --if discarded SSummon from 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_F) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_TO_GRAVE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.thcon) + e2:SetCost(s.sp2cost) + e2:SetTarget(s.sp2tg) + e2:SetOperation(s.sp2op) + c:RegisterEffect(e2) + --Discard to change lvl and special summon token + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,2)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES) + e3:SetType(EFFECT_TYPE_IGNITION) + e3:SetRange(LOCATION_MZONE) + e3:SetProperty(EFFECT_FLAG_CARD_TARGET) + e3:SetCountLimit(1,{id,2}) + e3:SetCost(s.cost) + e3:SetTarget(s.target) + e3:SetOperation(s.operation) + c:RegisterEffect(e3) +end +--Discard then SpSummon +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + --Reveal until the end of opponent's turn. + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,3)) + e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_PUBLIC) + e1:SetReset(RESETS_STANDARD_PHASE_END,2) + c:RegisterEffect(e1) +end +function s.spfilter(c,e,tp) + return c:IsSetCard(0x123) and not c:IsSetCard(0x1123) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.disfilter(c,e,tp) + return (c:IsSetCard(0xf19) or c:IsSetCard(0x123) or c:IsSetCard(0x1123)) and c:IsDiscardable() +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.disfilter,tp,LOCATION_HAND,0,1,nil) + and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE) + Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + --Cannot Special Summon from the Extra Deck, except Synchro monsters + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetDescription(aux.Stringid(id,4)) + 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(_,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_SYNCHRO) and not (c:IsType(TYPE_LINK) and c:IsRace(RACE_PLANT|RACE_DRAGON)) end) + e1:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e1,tp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) + local g=Duel.SelectMatchingCard(tp,s.disfilter,tp,LOCATION_HAND,0,1,1,nil) + if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.spfilter,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 +end +--If sent to GY by Plant monster effect +function s.costfilter(c) + local lv=c:GetLevel() + return c:IsType(TYPE_RITUAL) and c:IsMonster() +end +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + if not re then return false end + return re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect() +end +function s.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) + local rc=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() + Duel.ConfirmCards(1-tp,rc) + e:SetLabelObject(rc) +end +function s.sp2filter(c,tc,e,tp) + local tc=e:GetLabelObject() + local ltc=tc:GetLevel() + return c:IsLevelBelow(ltc) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) +end +function s.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) +end +function s.sp2op(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + local tc=e:GetLabelObject() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + if tc then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local sc=Duel.SelectMatchingCard(tp,s.sp2filter,tp,LOCATION_GRAVE,0,1,1,nil,tc,e,tp):GetFirst() + if sc and Duel.SpecialSummonStep(sc,0,tp,tp,true,true,POS_FACEUP) then + --Negate its effects + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_DISABLE) + e1:SetReset(RESET_EVENT+RESETS_STANDARD) + sc:RegisterEffect(e1,true) + local e2=Effect.CreateEffect(c) + e2:SetType(EFFECT_TYPE_SINGLE) + e2:SetCode(EFFECT_DISABLE_EFFECT) + e2:SetReset(RESET_EVENT+RESETS_STANDARD) + sc:RegisterEffect(e2,true) + end + Duel.SpecialSummonComplete() + end +end +--Special Summon Rose token +function s.cost2filter(c) + return (c:IsSetCard(0xf19) or c:IsSetCard(0x123) or c:IsSetCard(0x1123)) and c:IsAbleToGraveAsCost() and c:IsMonster() +end +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.cost2filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.cost2filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) + Duel.SendtoGrave(g,REASON_COST) +end +function s.filter(c) + return (c:IsSetCard(0xf19) or c:IsSetCard(0x123) or c:IsSetCard(0x1123)) and c:IsFaceup() and c:HasLevel() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) + Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + local lv2=Duel.GetFirstTarget():GetLevel() + local lv=Duel.AnnounceNumber(tp,1,2) + if tc:IsRelateToEffect(e) and tc:IsFaceup() then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_CHANGE_LEVEL) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetValue(lv+lv2) + e1:SetReset(RESET_EVENT|RESETS_STANDARD) + tc:RegisterEffect(e1) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,0,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,tp) then + local token=Duel.CreateToken(tp,TOKEN_ROSE) + Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) + end + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000030.lua b/users/Whispered_009/c2009000030.lua new file mode 100644 index 0000000..eb3b77d --- /dev/null +++ b/users/Whispered_009/c2009000030.lua @@ -0,0 +1,37 @@ +--Blooming Rose Accord +local s,id=GetID() +function s.initial_effect(c) + --Activate + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_SEARCH+CATEGORY_HANDES) + e1:SetType(EFFECT_TYPE_ACTIVATE) + e1:SetCode(EVENT_FREE_CHAIN) + e1:SetCountLimit(1,id) + e1:SetTarget(s.target) + e1:SetOperation(s.activate) + c:RegisterEffect(e1) +end + +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,0,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,tp) end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0) +end +function s.cfilter(c) + return c:IsAbleToHand() and c:IsMonster() and (c:IsSetCard(0x123) or c:IsSetCard(0x1123)) +end +function s.activate(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end + if not Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ROSE,0,TYPES_TOKEN,800,800,2,RACE_PLANT,ATTRIBUTE_DARK,POS_FACEUP_ATTACK,tp) then return end + local token=Duel.CreateToken(tp,TOKEN_ROSE) + if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) and + Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) then Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK,0,1,1,nil) + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000031.lua b/users/Whispered_009/c2009000031.lua new file mode 100644 index 0000000..5b6198f --- /dev/null +++ b/users/Whispered_009/c2009000031.lua @@ -0,0 +1,76 @@ +--Rose Sovereign Centaur +local s,id=GetID() +function s.initial_effect(c) + --Special Summon itself from the hand in Defense Position + 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:SetCondition(s.spcon) + e1:SetTarget(s.sptg) + e1:SetOperation(s.spop) + c:RegisterEffect(e1) + --Lv up + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) + e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e2:SetCode(EVENT_SUMMON_SUCCESS) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCondition(s.lvcon) + e2:SetTarget(s.lvtg) + e2:SetOperation(s.lvop) + c:RegisterEffect(e2) + local e3=e2:Clone() + e3:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e3) +end + +function s.sfilter(c) + return c:IsFacedown() or not c:IsRace(RACE_PLANT|RACE_DRAGON) +end +function s.spcon(e,tp,eg,ep,ev,re,r,rp) + return not Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_MZONE,0,1,nil) +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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) +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() + if c:IsRelateToEffect(e) then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) + end +end +--increase lv of 1 "Rose" or "Rose Dragon" by 2 +function s.cfilter(c,tp) + return c:IsFaceup() and c:IsSetCard(0x123) and c:IsControler(tp) +end +function s.lvcon(e,tp,eg,ep,ev,re,r,rp) + return not eg:IsContains(e:GetHandler()) and eg:IsExists(s.cfilter,1,nil,tp) +end +function s.lvfilter(c) + return c:IsFaceup() and c:GetLevel()>0 and (c:IsSetCard(0x123) or c:IsSetCard(0x1123)) +end +function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) + local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.lvop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then + local e1=Effect.CreateEffect(e:GetHandler()) + e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetCode(EFFECT_UPDATE_LEVEL) + e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) + e1:SetValue(2) + tc:RegisterEffect(e1) + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000032.lua b/users/Whispered_009/c2009000032.lua new file mode 100644 index 0000000..de6976e --- /dev/null +++ b/users/Whispered_009/c2009000032.lua @@ -0,0 +1,63 @@ +--Verdant Rose Leo +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PLANT|RACE_DRAGON),1,99) + --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,0}) + e1:SetTarget(s.tgtg) + e1:SetOperation(s.tgop) + c:RegisterEffect(e1) + --Special summon a plant monster + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetCountLimit(1,{id,1}) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) +end + +--Send plant monster to gy when it is special summoned +function s.tgfilter(c) + return c:IsRace(RACE_PLANT) and c:IsAbleToGrave() +end +function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) +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,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +--SSummon 1 "rose" monster from gy +function s.spfilter(c,e,tp) + return c:IsSetCard(0x123) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsSetCard(0x1123) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE|LOCATION_REMOVED) and chkc:IsControler(tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,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) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000033.lua b/users/Whispered_009/c2009000033.lua new file mode 100644 index 0000000..c8f2e0b --- /dev/null +++ b/users/Whispered_009/c2009000033.lua @@ -0,0 +1,86 @@ +--Eternal Bloom Rose Dragon +local s,id=GetID() +function s.initial_effect(c) + c:EnableReviveLimit() + --Synchro Summon procedure + Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsRace,RACE_PLANT|RACE_DRAGON),1,99) + --atk + local e1=Effect.CreateEffect(c) + e1:SetType(EFFECT_TYPE_SINGLE) + e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e1:SetRange(LOCATION_MZONE) + e1:SetCode(EFFECT_UPDATE_ATTACK) + e1:SetCondition(s.valcon) + e1:SetValue(600) + c:RegisterEffect(e1) + --If special summoned, destroy all of opponent's spells/traps + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,0)) + e2:SetCategory(CATEGORY_DESTROY) + e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY) + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + e2:SetCountLimit(1,id) + e2:SetTarget(s.destg) + e2:SetOperation(s.desop) + c:RegisterEffect(e2) + --Send to GY + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_TOGRAVE) + e3:SetType(EFFECT_TYPE_QUICK_O) + e3:SetCode(EVENT_CHAINING) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetRange(LOCATION_MZONE) + e3:SetCountLimit(1,{id,1}) + e3:SetCost(s.descost) + e3:SetTarget(s.target) + e3:SetOperation(s.operation) + c:RegisterEffect(e3) +end + +--atk +function s.vfilter(c) + return c:IsFaceup() and c:IsSetCard(0x123|0x1123) +end +function s.valcon(e) + return Duel.IsExistingMatchingCard(s.vfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) +end +--Destroy S/T +function s.desfilter(c) + return c:IsType(TYPE_SPELL+TYPE_TRAP) +end +function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) + Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) +end +function s.desop(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetMatchingGroup(s.desfilter,tp,0,LOCATION_ONFIELD,nil) + if #g>0 then + Duel.Destroy(g,REASON_EFFECT) + end +end +--Send to GY +function s.rfilter(c) + return (c:IsRace(RACE_PLANT) or c:IsRace(RACE_DRAGON)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) +end +function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) + local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,1,1,nil) + Duel.Remove(g,POS_FACEUP,REASON_COST) +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,2,nil) + Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + local g=Duel.GetTargetCards(e) + if #g>0 then + Duel.HintSelection(g,true) + Duel.SendtoGrave(g,REASON_EFFECT) + end +end \ No newline at end of file From d147e1b65da231123ae822d51d20a672671bdf6b Mon Sep 17 00:00:00 2001 From: Whispered <38574940+whispered1020@users.noreply.github.com> Date: Sat, 14 Jun 2025 16:25:13 -0300 Subject: [PATCH 3/4] Added new Predaplant card And uploaded Rose Sprite --- users/Whispered_009/c2009000029.lua | 2 +- users/Whispered_009/c2009000034.lua | 171 ++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 users/Whispered_009/c2009000034.lua diff --git a/users/Whispered_009/c2009000029.lua b/users/Whispered_009/c2009000029.lua index 035a8e3..d999efb 100644 --- a/users/Whispered_009/c2009000029.lua +++ b/users/Whispered_009/c2009000029.lua @@ -64,7 +64,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.spop(e,tp,eg,ep,ev,re,r,rp) - --Cannot Special Summon from the Extra Deck, except Synchro monsters + --Cannot Special Summon from the Extra Deck, except Synchro or Link Plant/Dragon monsters local e1=Effect.CreateEffect(e:GetHandler()) e1:SetDescription(aux.Stringid(id,4)) e1:SetType(EFFECT_TYPE_FIELD) diff --git a/users/Whispered_009/c2009000034.lua b/users/Whispered_009/c2009000034.lua new file mode 100644 index 0000000..9a660e2 --- /dev/null +++ b/users/Whispered_009/c2009000034.lua @@ -0,0 +1,171 @@ +--Lentic-waters Biome Predaplant Aldrocrab +local s,id=GetID() +function s.initial_effect(c) + --Discard then activate 1 of these effects + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON) + e1:SetType(EFFECT_TYPE_IGNITION) + e1:SetRange(LOCATION_HAND) + e1:SetCountLimit(1,{id,0}) + e1:SetCost(s.dscost) + e1:SetTarget(s.dstg) + e1:SetOperation(s.dsop) + c:RegisterEffect(e1) + --Special Summon itself from the hand + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetCategory(CATEGORY_SPECIAL_SUMMON) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_HAND) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(s.spcost) + e2:SetTarget(s.sptg) + e2:SetOperation(s.spop) + c:RegisterEffect(e2) + --Can be used as a non-Tuner for the Synchro Summon of a Plant monster + local e3=Effect.CreateEffect(c) + e3:SetType(EFFECT_TYPE_SINGLE) + e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) + e3:SetCode(EFFECT_NONTUNER) + e3:SetRange(LOCATION_MZONE) + e3:SetValue(function(e,sc) return sc:IsRace(RACE_PLANT) end) + c:RegisterEffect(e3) + --if discarded SSummon from GY + local e4=Effect.CreateEffect(c) + e4:SetDescription(aux.Stringid(id,6)) + e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER) + e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e4:SetCode(EVENT_TO_GRAVE) + e4:SetCountLimit(1,{id,6}) + e4:SetCondition(s.thcon) + e4:SetTarget(s.sp2tg) + e4:SetOperation(s.sp2op) + c:RegisterEffect(e4) +end +s.listed_series={SET_PREDAPLANT} +s.counter_place_list={COUNTER_PREDATOR} +--Discard then activate 1 of these effects +function s.dscost(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return not c:IsPublic() end + --Reveal until the end of opponent's turn. + local e5=Effect.CreateEffect(c) + e5:SetDescription(aux.Stringid(id,2)) + e5:SetProperty(EFFECT_FLAG_CLIENT_HINT) + e5:SetType(EFFECT_TYPE_SINGLE) + e5:SetCode(EFFECT_PUBLIC) + e5:SetReset(RESETS_STANDARD_PHASE_END,2) + c:RegisterEffect(e5) +end +function s.dsfilter(c,e,tp) + return c:IsSetCard(0xf19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.ds2filter(c) + return c:IsSetCard(0xf19) and c:IsAbleToGrave() +end +function s.dstg(e,tp,eg,ep,ev,re,r,rp,chk) + local b1=Duel.IsExistingTarget(s.dsfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) + local b2=Duel.IsExistingMatchingCard(s.ds2filter,tp,LOCATION_DECK,0,1,nil) + if chk==0 then return b1 or b2 end + local op=Duel.SelectEffect(tp, + {b1,aux.Stringid(id,3)}, + {b2,aux.Stringid(id,4)}) + e:SetLabel(op) + if op==1 then + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) + elseif op==2 then + Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) + end +end +function s.dsop(e,tp,eg,ep,ev,re,r,rp) + if e:GetLabel()==1 then + if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.dsfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + if #g>0 then + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end + end + else + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) + local g=Duel.SelectMatchingCard(tp,s.ds2filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoGrave(g,REASON_EFFECT) + end +end +end +--SSummon itself and 1 other monster +function s.filter(c,e,tp) + return (c:IsLevel(3) and c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_DARK)) or (c:IsSetCard(0xf19)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.CheckLPCost(tp,1000) end + Duel.PayLPCost(tp,1000) +end +function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) + and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 + and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) + and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,e:GetHandler(),e,tp) end + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) +end +function s.spop(e,tp,eg,ep,ev,re,r,rp) + if not e:GetHandler():IsRelateToEffect(e) then return end + if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end + if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end + --Cannot Special Summon for the rest of this turn, except Plant monsters + local e0=Effect.CreateEffect(c) + e0:SetDescription(aux.Stringid(id,5)) + e0:SetType(EFFECT_TYPE_FIELD) + e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) + e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) + e0:SetTargetRange(1,0) + e0:SetTarget(function(_,c) return not c:IsRace(RACE_PLANT) end) + e0:SetReset(RESET_PHASE|PHASE_END) + Duel.RegisterEffect(e0,tp) + --Special Summon from Deck + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,e:GetHandler(),e,tp) + if #g>0 then + g:AddCard(e:GetHandler()) + Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) + end +end +--if discarded SSummon from GY +function s.thcon(e,tp,eg,ep,ev,re,r,rp) + if not re then return false end + return re:GetHandler():IsRace(RACE_PLANT) and re:GetOwner()~=c and re:IsMonsterEffect() +end +function s.sp2filter(c,e,tp) + return c:IsSetCard(SET_PREDAPLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) +end +function s.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) end + if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsExistingTarget(s.sp2filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) + local g=Duel.SelectTarget(tp,s.sp2filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) + Duel.SetPossibleOperationInfo(0,CATEGORY_COUNTER,nil,1,0,COUNTER_SPELL) +end +function s.sp2op(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) + local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,COUNTER_PREDATOR,1):GetFirst() + if g:AddCounter(COUNTER_PREDATOR,1) and g:GetLevel()>1 then + local e6=Effect.CreateEffect(e:GetHandler()) + e6:SetType(EFFECT_TYPE_SINGLE) + e6:SetCode(EFFECT_CHANGE_LEVEL) + e6:SetReset(RESET_EVENT|RESETS_STANDARD) + e6:SetCondition(s.lvcon) + e6:SetValue(1) + tc:RegisterEffect(e6) + end +end +end +function s.lvcon(e) + return e:GetHandler():GetCounter(COUNTER_PREDATOR)>0 +end \ No newline at end of file From f65bf03e8134750c9c22ce1c9f909f89474f7992 Mon Sep 17 00:00:00 2001 From: Whispered <38574940+whispered1020@users.noreply.github.com> Date: Sun, 20 Jul 2025 11:20:15 -0300 Subject: [PATCH 4/4] Scrips for the new 2 Penguin Effect Cards --- users/Whispered_009/c2009000036.lua | 84 +++++++++++++++++++++++++++++ users/Whispered_009/c2009000037.lua | 73 +++++++++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 users/Whispered_009/c2009000036.lua create mode 100644 users/Whispered_009/c2009000037.lua diff --git a/users/Whispered_009/c2009000036.lua b/users/Whispered_009/c2009000036.lua new file mode 100644 index 0000000..7876f4f --- /dev/null +++ b/users/Whispered_009/c2009000036.lua @@ -0,0 +1,84 @@ +--Penguin Apostle +local s,id=GetID() +function s.initial_effect(c) + --Add 1 "Penguin" monster from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_POSITION) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) + e1:SetCode(EVENT_SUMMON_SUCCESS) + e1:SetCountLimit(1,{id,0}) + e1:SetTarget(s.thtg) + e1:SetOperation(s.thop) + c:RegisterEffect(e1) + local e2=e1:Clone() + e2:SetCode(EVENT_SPSUMMON_SUCCESS) + c:RegisterEffect(e2) + --Special Summon token + local e3=Effect.CreateEffect(c) + e3:SetDescription(aux.Stringid(id,1)) + e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) + e3:SetProperty(EFFECT_FLAG_DELAY) + e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) + e3:SetTarget(s.target) + e3:SetOperation(s.operation) + c:RegisterEffect(e3,false,CUSTOM_REGISTER_FLIP) +end +s.listed_series={SET_PENGUIN} +s.listed_names={2009000038,73640163} +--Add then +function s.thfilter(c) + return c:IsSetCard(SET_PENGUIN) and c:IsAbleToHand() and c:IsMonster() +end +function s.th2filter(c) + return c:IsCode(73640163) and c:IsAbleToHand() +end +function s.setfilter(c) + return c:IsFaceup() and c:IsSetCard(0x5a) and c:IsCanTurnSet() +end +function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) + Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,0,0) +end +function s.thop(e,tp,eg,ep,ev,re,r,rp,chkc) + local c=e:GetHandler() + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() + if g and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then + Duel.ConfirmCards(1-tp,g) + Duel.ShuffleHand(tp) + --flip if a Tuner was added + if g:IsType(TYPE_TUNER) and s.setfilter(c) then + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) + --local fg=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() + if c:IsFaceup() and c:IsRelateToEffect(e) then + Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) + end + end + local break_chk=false + --Add 1 "Penguin Cleric" if added a non-Tuner + if not g:IsType(TYPE_TUNER) then + local dg=Duel.SelectMatchingCard(tp,s.th2filter,tp,LOCATION_DECK,0,1,1,nil) + break_chk=true + Duel.BreakEffect() + Duel.SendtoHand(dg,nil,REASON_EFFECT) + end +end +end +--flip and Special Summon token +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return true end + Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) + Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 + and Duel.IsPlayerCanSpecialSummonMonster(tp,2009000038,0,TYPES_TOKEN,300,600,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_ATTACK,tp) then + local token=Duel.CreateToken(tp,2009000038) + Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) + Duel.SpecialSummonComplete() + end +end \ No newline at end of file diff --git a/users/Whispered_009/c2009000037.lua b/users/Whispered_009/c2009000037.lua new file mode 100644 index 0000000..9ad0501 --- /dev/null +++ b/users/Whispered_009/c2009000037.lua @@ -0,0 +1,73 @@ +--Penguin Admiral Glaciator +local s,id=GetID() +function s.initial_effect(c) + --xyz summon + Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsAttribute,ATTRIBUTE_WATER),5,2) + c:EnableReviveLimit() + --Negate the activation of a Spell/Trap card or effect + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) + e1:SetType(EFFECT_TYPE_QUICK_O) + e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) + e1:SetCode(EVENT_CHAINING) + e1:SetRange(LOCATION_MZONE) + e1:SetCountLimit(1,id) + e1:SetCondition(s.negcon) + e1:SetTarget(s.negtg) + e1:SetOperation(s.negop) + c:RegisterEffect(e1) + --Change Position + local e2=Effect.CreateEffect(c) + e2:SetDescription(aux.Stringid(id,1)) + e2:SetProperty(EFFECT_FLAG_CARD_TARGET) + e2:SetType(EFFECT_TYPE_IGNITION) + e2:SetRange(LOCATION_MZONE) + e2:SetCountLimit(1,{id,1}) + e2:SetCost(Cost.DetachFromSelf(1,1,nil)) + e2:SetTarget(s.postg) + e2:SetOperation(s.posop) + c:RegisterEffect(e2) +end + +--Negate Spell/Trap +function s.filter(c) + return c:IsRace(RACE_AQUA) and c:IsAbleToDeck() +end +function s.negcon(e,tp,eg,ep,ev,re,r,rp) + return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) + and ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainNegatable(ev) +end +function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) + local c=e:GetHandler() + if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) + local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil) + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) +end +function s.negop(e,tp,eg,ep,ev,re,r,rp) + local tc=Duel.GetFirstTarget() + if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT) then + if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then + Duel.Destroy(eg,REASON_EFFECT) + end + end +end +--Change Aqua monster's to face-up Position +function s.posfilter(c) + return c:IsFacedown() and c:IsDefensePos() and c:IsCanChangePosition() and c:IsRace(RACE_AQUA) +end +function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) + if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end + if chk==0 then return Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,0,1,nil) end + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWNDEFENSE) + Duel.SelectTarget(tp,s.posfilter,tp,LOCATION_MZONE,0,1,1,nil) +end +function s.posop(e,tp,eg,ep,ev,re,r,rp) + local c=e:GetHandler() + local tc=Duel.GetFirstTarget() + if tc:IsRelateToEffect(e) then + Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) + end +end \ No newline at end of file