--Kang Fu local s,id=GetID() function s.initial_effect(c) aux.AddOrigTimeleapType(c,false) aux.AddTimeleapProc(c,3,s.sumcon,s.tlfilter) c:EnableReviveLimit() --At the start of the Damage Step, if this card battles an opponent's monster: You can return that opponent's monster to the hand, also inflict 400 damage to your opponent. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_BATTLE_START) e1:SetCountLimit(1,id) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) --If this card attacks, it is changed to Defense Position at the end of the Battle Phase. local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_PHASE+PHASE_BATTLE) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1) e2:SetCondition(s.poscon) e2:SetOperation(s.posop) c:RegisterEffect(e2) end function s.sumcon(e,c) local tp=c:GetControler() return Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) and not Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,LOCATION_MZONE,0,1,nil,LOCATION_EXTRA) end function s.tlfilter(c,e,mg) local tp=c:GetControler() local ef=e:GetHandler():GetFuture() return c:IsLevelBelow(ef-1) and not c:IsType(TYPE_TOKEN) end function s.poscon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():GetAttackedCount()>0 end function s.posop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsAttackPos() then Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local tc=c:GetBattleTarget() if chk==0 then return tc and tc:IsAbleToHand() end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(400) Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetAttacker() if c==tc then tc=Duel.GetAttackTarget() end if tc and tc:IsRelateToBattle() then Duel.SendtoHand(tc,nil,REASON_EFFECT) end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end