--Anbionic Dapper Maiden local s,id,o=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,Card.IsPositive,1,1,Card.IsNegative,1,1) --If this card was Bigbang Summoned using a non-Token monster as material, its original ATK/DEF become 0. local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(s.atkcon) e1:SetOperation(s.atkop) e1:SetLabelObject(e0) c:RegisterEffect(e1) --If this card is Special Summoned: You can shuffle 1 card from your hand into the Deck, and if you do, Set 1 "Anbionic Companion" card directly from your Deck. local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK+CATEGORY_SET) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCountLimit(1,{id,0}) e2:SetTarget(s.settg) e2:SetOperation(s.setop) c:RegisterEffect(e2) --(Quick Effect): You can target 1 face-up monster on the field; swap its original ATK/DEF until the end of this turn. local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetHintTiming(0,TIMING_MAIN_END) e3:SetCountLimit(1) e3:SetTarget(s.adtg) e3:SetOperation(s.adop) c:RegisterEffect(e3) end function s.valcheck(e,c) local g=c:GetMaterial() for tc in aux.Next(g) do if not tc:IsType(TYPE_TOKEN) then e:SetLabel(1) end end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_BIGBANG) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local notoken=e:GetLabelObject():GetLabel() if notoken==1 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetValue(0) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(0) c:RegisterEffect(e2) end end function s.setfilter(c) return c:IsSetCard(0x1e57) and c:IsSSetable() end function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) end function s.setop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if tc then Duel.SSet(tp,tc) end end end function s.adfilter(c) return c:IsFaceup() and c:IsDefenseAbove(0) and c:GetBaseAttack()~=c:GetBaseDefense() end function s.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.adfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.adfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,s.adfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) end function s.adop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then local atk=tc:GetBaseAttack() local def=tc:GetBaseDefense() local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SET_BASE_ATTACK) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetValue(def) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_SET_BASE_DEFENSE) e2:SetValue(atk) tc:RegisterEffect(e2) end end