Racer_33
Member Title : Racer_33 Posts : 6 Join date : 2014-08-18
| Subject: Synchro, Tuner and Xyz for D.D. Mon Jan 19, 2015 2:21 am | |
| 3 new cards for the D.D. and Dimensional Archetypes - Spoiler:
--D.D. Captain function c29641226.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsSetCard,0x335),4),2) c:EnableReviveLimit() --Banish field local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(29641226,0)) e1:SetCategory(CATEGORY_REMOVE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1) e1:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1e0) e1:SetCost(c29641226.thcost) e1:SetTarget(c29641226.thtg) e1:SetOperation(c29641226.thop) c:RegisterEffect(e1) --banish overlay local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetRange(LOCATION_MZONE) e2:SetTarget(c29641226.rmtarget) e2:SetValue(LOCATION_REMOVED) c:RegisterEffect(e2) --Attach local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(29641226,1)) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1) e3:SetTarget(c29641226.target) e3:SetOperation(c29641226.operation) c:RegisterEffect(e3) end function c29641226.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) end function c29641226.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_Remove,g,1,0,0) end function c29641226.thop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end end function c29641226.rmtarget(e,c) return c:IsLocation(0x80) end function c29641226.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,0) end function c29641226.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end Duel.ConfirmDecktop(tp,1) local g=Duel.GetDecktopGroup(tp,1) local tc=g:GetFirst() if tc:IsType(TYPE_MONSTER) then Duel.DisableShuffleCheck() Duel.Overlay(c,g) end if not tc:IsType(TYPE_MONSTER) then Duel.DisableShuffleCheck() Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end end
- Spoiler:
--D.D. Chaotic Prince, Krypto function c183928600.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x333),aux.NonTuner(nil),1) c:EnableReviveLimit() --Equip Monster local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(183928600,0)) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(c183928600.eqtg) e1:SetOperation(c183928600.eqop) c:RegisterEffect(e1) --remove replace local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetTarget(c183928600.desreptg) e2:SetOperation(c183928600.desrepop) c:RegisterEffect(e2) end function c183928600.filter(c,tp) return c:IsFaceup() and c:IsType(TYPE_MONSTER) end function c183928600.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c183928600.filter(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c183928600.filter,tp,LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,c183928600.filter,tp,LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) end function c183928600.eqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end local c=e:GetHandler() local tc=Duel.GetFirstTarget() if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then local atk=tc:GetTextAttack()/2 if atk<0 then atk=0 end if not Duel.Equip(tp,tc,c,false) then return end local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetValue(c183928600.eqlimit) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetValue(atk) tc:RegisterEffect(e2) end end function c183928600.eqlimit(e,c) return e:GetOwner()==c end function c183928600.repfilter(c) return c:IsType(TYPE_SPELL) and c:IsLocation(LOCATION_SZONE) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end function c183928600.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then local g=c:GetEquipGroup() return not c:IsReason(REASON_REPLACE) and g:IsExists(c183928600.repfilter,1,nil) end if Duel.SelectYesNo(tp,aux.Stringid(183928600,1)) then local g=c:GetEquipGroup() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local sg=g:FilterSelect(tp,c183928600.repfilter,1,1,nil) Duel.SetTargetCard(sg) return true else return false end end function c183928600.desrepop(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT+REASON_REPLACE) end
- Spoiler:
--D.D. Leviathan function c96159563.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_REMOVED) e1:SetCountLimit(1,96159563+EFFECT_COUNT_CODE_DUEL) e1:SetCountLimit(1,96159563) e1:SetCondition(c96159563.negcon) e1:SetTarget(c96159563.target) e1:SetOperation(c96159563.operation) c:RegisterEffect(e1) --Synchro Material local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCode(EVENT_BE_MATERIAL) e2:SetCountLimit(1,96159563+EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,96159563) e2:SetCondition(c96159563.drcon) e2:SetTarget(c96159563.syntar) e2:SetOperation(c96159563.synop) c:RegisterEffect(e2) end function c96159563.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetFlagEffect(tp,96159563)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,4,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.RegisterFlagEffect(tp,96159563,0,0,0) end function c96159563.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local g=Duel.GetDecktopGroup(tp,4) Duel.DisableShuffleCheck() Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end function c96159563.negcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnID()~=Duel.GetTurnCount() end function c96159563.drcon(e,tp,eg,ep,ev,re,r,rp) return r==REASON_SYNCHRO and (e:GetHandler():GetReasonCard():IsSetCard(0x335) or e:GetHandler():GetReasonCard():IsSetCard(0x333)) end function c96159563.syntar(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and chkc:IsAbleToDeck()end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,2,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,2,2,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) end function c96159563.synop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=g:Filter(Card.IsRelateToEffect,nil,e) if sg:GetCount()>0 then Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) local tc=Duel.SelectTarget(tp,c96159563.filter,tp,LOCATION_REMOVED,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.HintSelection(tc) Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc) end end function c96159563.filter(c) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end
|
|