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 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