Commit 373096e0 authored by mercury233's avatar mercury233 Committed by DailyShana

fix Trap Hole of Spikes (#627)

parent 9f5dbf71
...@@ -17,12 +17,14 @@ end ...@@ -17,12 +17,14 @@ end
function c75902998.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75902998.target(e,tp,eg,ep,ev,re,r,rp,chk)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if chk==0 then return at:IsRelateToBattle() end if chk==0 then return at:IsRelateToBattle() end
local dam=math.max(at:GetBaseAttack()/2,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,at,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,at,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end end
function c75902998.activate(e,tp,eg,ep,ev,re,r,rp) function c75902998.activate(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and Duel.Destroy(at,REASON_EFFECT)~=0 then if at:IsRelateToBattle() and Duel.Destroy(at,REASON_EFFECT)~=0 then
local atk=at:GetTextAttack()/2 local atk=at:GetBaseAttack()/2
if atk>0 then if atk>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment