--动物朋友 我的朋友 local m=33700501 local cm=_G["c"..m] cm.dfc_front_side=m+1 cm.card_code_list={33700056} Duel.LoadScript("c37564765.lua") function cm.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_ADJUST) e2:SetRange(LOCATION_SZONE) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0) return g:GetClassCount(Card.GetCode)=Duel.GetLP(tp) end) e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Senya.IsDFCTransformable(c) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end) e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end Duel.Hint(HINT_MUSIC,0,m*16+3) Senya.TransformDFCCard(c) end) c:RegisterEffect(e4) end function cm.nfilter(c,tp) if not c:IsSetCard(0x442) or not c:IsType(TYPE_MONSTER) then return false end if c:IsLocation(LOCATION_GRAVE) then return true end if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return true end return false end function cm.condition(e,tp,eg,ep,ev,re,r,rp) if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) if not g then return false end local c=e:GetHandler() return ep==1-tp and g:IsExists(cm.nfilter,1,nil,tp) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function cm.operation(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.NegateActivation(ev) end function cm.cbcon(e,tp,eg,ep,ev,re,r,rp) local bt=Duel.GetAttackTarget() return bt and bt:IsFaceup() and bt:IsSetCard(0x442) and bt:GetControler()==e:GetHandlerPlayer() end function cm.cbtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.GetAttacker():IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK) end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function cm.cbop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.ChangeAttackTarget(nil) end