--Transcendent Bonds xpcall(function() require("expansions/script/c28916110") end,function() require("script/c28916110") end) local id,ref=HighTyper.getID() function ref.initial_effect(c) local magick=Effect.CreateEffect(c) magick:SetDescription(aux.Stringid(id,0)) magick:SetCategory(CATEGORY_DRAW) magick:SetType(EFFECT_TYPE_TRIGGER_O) magick:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) magick:SetTarget(ref.drtg) magick:SetOperation(ref.drop) aux.AddMagickProcLocation(c,LOCATION_HAND,aux.MagickMatCost,magick,aux.TRUE,1) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCondition(ref.thcon) e1:SetTarget(ref.thtg) e1:SetOperation(ref.thop) c:RegisterEffect(e1) end function ref.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,1,tp,0) end function ref.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) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetTargetRange(1,0) e1:SetValue(function(e,re) return re:GetHandler():IsCode(id) end) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function ref.thcon(e,tp,eg,ep,ev,re,r,rp) return HighTyper.IsAllUnique(tp) end function ref.thfilter(c) return c:IsType(TYPE_SPELL) and c:IsAbleToHand() end function ref.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and ref.thfilter(chkc,e,tp) end if chk==0 then return Duel.IsExistingTarget(ref.thfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,ref.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) end function ref.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 local c=e:GetHandler() if c:IsRelateToEffect(e) and HighTyper.HasFullHouse(tp) then c:CancelToGrave() Duel.SendtoHand(c,nil,REASON_EFFECT) end end