Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions official/c33248692.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
--Option Hunter
local s,id=GetID()
function s.initial_effect(c)
--Activate
--Gain Life Points equal to the original ATK of the destroyed monster
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
Expand All @@ -15,14 +16,14 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.filter(c,tp)
return c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE)
return c:IsPreviousControler(tp) and c:IsLocation(LOCATION_GRAVE) and c:IsMonster() and c:IsReason(REASON_BATTLE)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsExists(s.filter,1,nil,tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local rec=eg:Filter(s.filter,nil,tp):GetFirst():GetBaseAttack()
local rec=eg:Filter(s.filter,nil,tp):GetSum(Card.GetBaseAttack)
if rec<0 then rec=0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Expand Down