--Hollohomfield Advantage local ref,id=GetID() xpcall(function() require("expansions/script/Hollohom") end,function() require("script/Hollohom") end) function ref.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_NEGATE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCountLimit(1,id) e1:SetCondition(ref.actcon) e1:SetTarget(ref.acttg) e1:SetOperation(ref.actop) c:RegisterEffect(e1) --Recurr local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,id) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetCost(aux.bfgcost) e2:SetTarget(ref.thtg) e2:SetOperation(ref.thop) c:RegisterEffect(e2) end --Activate function ref.actcon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and Duel.IsChainNegatable(ev) and not re:IsActiveType(TYPE_FIELD) end function ref.acttg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) end function ref.actop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) then if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then Duel.SendtoGrave(eg,REASON_EFFECT) end local c=e:GetHandler() if Hollohom.FieldCheck(tp) and c:IsRelateToEffect(e) and c:IsSSetable(true) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.BreakEffect() c:CancelToGrave() Duel.ChangePosition(c,POS_FACEDOWN) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end end end --Recurr function ref.thfilter(c) return Hollohom.Is(c) and c:IsAbleToHand() and not c:IsCode(id) end function ref.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and ref.thfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(ref.thfilter,tp,LOCATION_REMOVED,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectTarget(tp,ref.thfilter,tp,LOCATION_REMOVED,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_REMOVED) end function ref.thop(e,tp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end