PiFace
2015-06-03T18:20:50Z
I was using the effect of Thousand Needles for a custom card and I've noticed while testing that its effect is activated even in attack position. I've checked the code again and again, but there's nothing wrong, as it states the defense pos as a condition, see:


--針千本
function c33977496.initial_effect(c)
	--destroy
	local e1=Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(33977496,0))
	e1:SetCategory(CATEGORY_DESTROY)
	e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
	e1:SetCode(EVENT_DAMAGE_STEP_END)
	e1:SetCondition(c33977496.condition)
	e1:SetTarget(c33977496.target)
	e1:SetOperation(c33977496.operation)
	c:RegisterEffect(e1)
end
function c33977496.condition(e,tp,eg,ep,ev,re,r,rp)
	return Duel.GetAttackTarget()==e:GetHandler() and e:GetHandler():IsDefencePos()
		and Duel.GetAttacker():GetAttack()<e:GetHandler():GetDefence()
end
function c33977496.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return true end
	Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttacker(),1,0,0)
end
function c33977496.operation(e,tp,eg,ep,ev,re,r,rp)
	local a=Duel.GetAttacker()
	if not a:IsRelateToBattle() then return end
	Duel.Destroy(a,REASON_EFFECT)
end

That was not supposed to happen... can someone fix that?
Steeldarkeagel
2015-06-03T21:16:46Z
The card works fine for me.

Please post a replay showing its effect working in Attack position, and on which server and game version this occurred.
PiFace
2015-06-04T01:45:57Z
I don't know why, but my YGOPro version (1.033.4 V2b Percy, the latest one) simply doesn't save any replays, so I can't show it. (Actually no other previous versions I've had could save replays) But now I tested on AI mode, LAN mode and Online mode (USA server) and the bug still happens ._.
Steeldarkeagel
2015-06-04T08:45:17Z
Do you have a replay folder? Did you extract the game after downloading? Have you tried naming it something simple like "Replay"? These are the two most common issues with replays.

If you could give me quick and concise instructions on how to find this error myself that would be useful.
PiFace
2015-06-04T17:51:40Z
Ok, I downloaded the game again, unzipped it and put it in its folder, and the bug still happens , but now I have a replay, because, as you said, I didn't have a replay folder.

(the deck I used is a plain test deck and I played against myself, as you can see)
File Attachment(s):
t n bug.yrp (1kb) downloaded 2 time(s).

You cannot view/download attachments. Try to login or register.