local m=19251407 local cm=_G["c"..m] cm.name="量子技师" function cm.initial_effect(c) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHO),aux.NonTuner(Card.IsRace,RACE_PSYCHO),1) c:EnableReviveLimit() local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetValue(cm.atkval) e2:SetLabel(1) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_UPDATE_DEFENSE) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,m) e4:SetCost(cm.thcost) e4:SetOperation(cm.thop) c:RegisterEffect(e4) local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_SPECIAL_SUMMON) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e5:SetCode(EVENT_TO_GRAVE) e5:SetCountLimit(1,m+100000000) e5:SetCondition(cm.spcon) e5:SetCost(aux.bfgcost) e5:SetTarget(cm.sptg) e5:SetOperation(cm.spop) c:RegisterEffect(e5) end function cm.atkval(e,c) return Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_REMOVED,0,nil)*200 end function cm.thcostfilter(c,tp) return c:IsRace(RACE_PSYCHO) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(cm.thtgfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute()) end function cm.thtgfilter(c,attr) return c:IsRace(RACE_PSYCHO) and c:IsAbleToHand() and c:IsAttribute(attr) end function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.thcostfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,cm.thcostfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp) e:SetLabel(g:GetFirst():GetAttribute()) Duel.Remove(g,POS_FACEUP,REASON_COST) end function cm.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cm.thtgfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel()) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function cm.spcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end function cm.spfilter(c,e,tp) return c:IsRace(RACE_PSYCHO) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,e:GetHandler(),e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end function cm.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