--Crisis Claw - Violence --Scripted by Yuno local cid,id=GetID() function cid.initial_effect(c) --Special Summon local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_TO_GRAVE) e1:SetCountLimit(1, id) e1:SetCondition(cid.spcon) e1:SetTarget(cid.sptg) e1:SetOperation(cid.spop) c:RegisterEffect(e1) --Destroy and inflict damage local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1, id+100) e2:SetCondition(cid.descon) e2:SetTarget(cid.destg) e2:SetOperation(cid.desop) c:RegisterEffect(e2) end --Special Summon function cid.spcon(e, tp, eg, ep, ev, re, r, rp) return re and re:GetHandler():IsSetCard(0x571) and bit.band(r, REASON_EFFECT)~=0 end function cid.sptg(e, tp, eg, ep, ev, re, r, rp, chk) if chk==0 then return Duel.GetLocationCount(tp, LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false) end Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0) end function cid.spop(e, tp, eg, ep, ev, re, r, rp) local c=e:GetHandler() if Duel.GetLocationCount(tp, LOCATION_MZONE)<=0 then return end if c:IsLocation(LOCATION_GRAVE) and c:IsRelateToEffect(e) then Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP) end end --Destroy and inflict damage function cid.descon(e, tp, eg, ep, ev, re, r, rp) return re and re:GetHandler():IsSetCard(0x571) end function cid.destg(e, tp, eg, ep, ev, re, r, rp, chk, chkc) if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end if chk==0 then return Duel.IsExistingTarget(nil, tp, 0, LOCATION_MZONE, 1, nil) end Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY) local g=Duel.SelectTarget(tp, nil, tp, 0, LOCATION_MZONE, 1, 1, nil) Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_DAMAGE, nil, 0, 1-tp, g:GetFirst():GetDefense()) end function cid.desop(e, tp, eg, ep, ev, re, r, rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.Destroy(tc, REASON_EFFECT)~=0 then Duel.Damage(1-tp, tc:GetDefense(), REASON_EFFECT) end end