--时穿剑·威道剑 local m=14000013 local cm=_G["c"..m] cm.named_with_Chronoblade=1 xpcall(function() require("expansions/script/c14000001") end,function() require("script/c14000001") end) function cm.initial_effect(c) --chrbeffects chrb.dire(c) --SpecialSummon local e4=Effect.CreateEffect(c) e4:SetDescription(aux.Stringid(m,0)) e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e4:SetCode(EVENT_CHAINING) e4:SetRange(LOCATION_HAND) e4:SetCost(cm.cost) e4:SetCondition(cm.spcon) e4:SetTarget(cm.sptg) e4:SetOperation(cm.spop) c:RegisterEffect(e4) end function cm.cfilter(c) return chrb.CHRB(c) and c:IsAbleToDeckAsCost() end function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) Duel.ConfirmCards(1-tp,g) Duel.SendtoDeck(g,nil,2,REASON_COST) end function cm.spcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp end function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) end function cm.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.Damage(p,d,REASON_EFFECT)==0 then return end if not c:IsRelateToEffect(e) then return end Duel.BreakEffect() Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end