--Woodland Ghost function c79854523.initial_effect(c) --search effect local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(79854523,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCountLimit(1,79854523) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCost(c79854523.cost) e1:SetTarget(c79854523.thtg) e1:SetOperation(c79854523.thop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS) c:RegisterEffect(e2) --burn effect local e3=Effect.CreateEffect (c) e3:SetDescription(aux.Stringid(79854523,1)) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,79854623) e3:SetCost(c79854523.coste) e3:SetTarget(c79854523.thtge) e3:SetOperation(c79854523.thope) c:RegisterEffect(e3) end function c79854523.cfilter(c) return c:IsRace(RACE_PLANT) and c:IsAbleToGraveAsCost() end function c79854523.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c79854523.cfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c79854523.cfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SendtoGrave(g,REASON_COST) end function c79854523.filter(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() end function c79854523.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c79854523.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c79854523.thop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c79854523.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 local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(1,0) e1:SetValue(c79854523.actlimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function c79854523.actlimit(e,re,rp) local rc=re:GetHandler() return re:IsActiveType(TYPE_MONSTER) and not rc:IsRace(RACE_PLANT) and not rc:IsImmuneToEffect(e) end --burn effect function c79854523.filtere(c,ec) return c:GetEquipTarget()==ec and c:IsAbleToGraveAsCost() end function c79854523.coste(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c79854523.filtere,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c79854523.filtere,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e:GetHandler()) Duel.SendtoGrave(g,REASON_COST) end function c79854523.filter2(c,ec) return c:IsRace(RACE_PLANT) end function c79854523.thtge(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c79854523.filter2,tp,LOCATION_GRAVE,0,1,nil) end Duel.SetTargetPlayer(1-tp) local dam=Duel.GetMatchingGroupCount(c79854523.filter2,tp,LOCATION_GRAVE,0,nil)*300 Duel.SetTargetParam(dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) end function c79854523.thope(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end