--Sverdånd Leggendario - Harald --Scripted by: XGlitchy30 local s,id = GetID() function s.initial_effect(c) aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x24d),aux.NonTuner(aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR)),1) c:EnableReviveLimit() --indes local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e0:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e0:SetRange(LOCATION_MZONE) e0:SetValue(1) c:RegisterEffect(e0) --send local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOGRAVE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetCondition(s.ctcon) e1:SetTarget(s.cttg) e1:SetOperation(s.ctop) c:RegisterEffect(e1) --change effect local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(2,id) e2:SetCondition(s.discon) e2:SetCost(s.discost) e2:SetTarget(s.distg) e2:SetOperation(s.disop) c:RegisterEffect(e2) end function s.ctcon(e,tp) local tc=e:GetHandler():GetBattleTarget() return aux.dsercon(e) and tc and tc:IsRelateToBattle() and tc:IsControler(1-tp) and tc:GetAttack()>e:GetHandler():GetAttack() end function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk) local tc=e:GetHandler():GetBattleTarget() if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tc,1,0,0) end function s.ctop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetBattleTarget() if tc and tc:IsRelateToBattle() and tc:IsAbleToGrave() then Duel.SendtoGrave(tc,REASON_EFFECT) end end function s.discon(e,tp,eg,ep,ev,re,r,rp) return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) end function s.cfilter(c) return c:IsSetCard(0x24d) and (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToGraveAsCost() end function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) end function s.distg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end end function s.disop(e,tp,eg,ep,ev,re,r,rp) local g=Group.CreateGroup() Duel.ChangeTargetCard(ev,g) Duel.ChangeChainOperation(ev,s.repop) end function s.repop(e,tp,eg,ep,ev,re,r,rp) Duel.Damage(1-tp,500,REASON_EFFECT) end