local m=11110102 local cm=_G["c"..m] cm.name="Rogner, Battle Butler of Ichyaltas" function cm.initial_effect(c) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCondition(cm.condition) e1:SetTarget(cm.target) e1:SetOperation(cm.operation) e1:SetCountLimit(1,m) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_RELEASE) e2:SetTarget(cm.adtg) e2:SetOperation(cm.adop) e2:SetCountLimit(1,m+100000000) c:RegisterEffect(e2) end function cm.condition(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) end function cm.filter(c) return c:IsSetCard(0x2a7) and c:IsAbleToHand() end function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function cm.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function cm.adfilter(c) return c:IsFaceup() and c:IsSetCard(0x2a7) end function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cm.adfilter,tp,LOCATION_MZONE,0,1,nil) end end function cm.adop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil) local tc=g:GetFirst() while tc do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(500) e1:SetReset(RESET_EVENT+RESETS_STANDARD) tc:RegisterEffect(e1) tc=g:GetNext() end end