Valossa
  • Valossa
  • Advanced Member Topic Starter
2016-09-15T14:14:25Z
During your opponent's Battle Phase: End the Battle Phase, then your opponent draws 1 card. At the End Phase of this turn, your Life Points become 0.


function c66460101.initial_effect(c)
  local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetHintTiming(TIMING_BATTLE_START,TIMING_BATTLE_START)
  e1:SetTarget(c66460101.target)
	e1:SetOperation(c66460101.activate)
  e1:SetOperation(c66460101.operation)
	c:RegisterEffect(e1)
  local e2=e1:Clone()
  e2:SetCode(EVENT_PHASE+PHASE_END)
  c:RegisterEffect(e2)
end
function c66460101.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
	Duel.SetTargetPlayer(tp)
	Duel.SetTargetParam(1)
	Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c66460101.activate(e,tp,eg,ep,ev,re,r,rp)
	Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
  local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
	Duel.Draw(p,d,REASON_EFFECT)
end
function c66460101.operation(e,tp,eg,ep,ev,re,r,rp)
  Duel.SetLP(tp,0,REASON_EFFECT)
end

donpas
2016-09-15T20:01:35Z
Originally Posted by: Valossa 

During your opponent's Battle Phase: End the Battle Phase, then your opponent draws 1 card. At the End Phase of this turn, your Life Points become 0.


function c66460101.initial_effect(c)
  local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetHintTiming(TIMING_BATTLE_START,TIMING_BATTLE_START)
  e1:SetTarget(c66460101.target)
	e1:SetOperation(c66460101.activate)
  e1:SetOperation(c66460101.operation)
	c:RegisterEffect(e1)
  local e2=e1:Clone()
  e2:SetCode(EVENT_PHASE+PHASE_END)
  c:RegisterEffect(e2)
end
function c66460101.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
	Duel.SetTargetPlayer(tp)
	Duel.SetTargetParam(1)
	Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c66460101.activate(e,tp,eg,ep,ev,re,r,rp)
	Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
  local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
	Duel.Draw(p,d,REASON_EFFECT)
end
function c66460101.operation(e,tp,eg,ep,ev,re,r,rp)
  Duel.SetLP(tp,0,REASON_EFFECT)
end



I still have not tried. But if I have misunderstood what I've seen so far ...

This:

if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end

It would be this:

if chk==0 then return Duel.IsPlayerCanDraw(1-tp,1) end

Why draw a card your opponent?
Valossa
  • Valossa
  • Advanced Member Topic Starter
2016-09-15T20:57:43Z
this is the card effect anime, appeared in yugioh zexal i dont remeber the episode, but anna kaboom use this card while dueling with yuma a tag duel, and i wanna try to make this card cause i liked your effect
Michael Lawrence Dee
2016-09-16T00:28:02Z
Didn't I already make it?
https://www.ygopro.co/Fo...sing-Anime-Cards-Project 

Check the Pre-Released Pack.
Now this is how I play:
donpas
2016-09-16T09:49:34Z
Originally Posted by: Valossa 

this is the card effect anime, appeared in yugioh zexal i dont remeber the episode, but anna kaboom use this card while dueling with yuma a tag duel, and i wanna try to make this card cause i liked your effect



Hi Valossa,

This card is:

http://yugioh.wikia.com/wiki/Devoted_Love 

I just checked the comment of Michael Lawrence De.

The card you are looking for is in the Pre-Pack Released with the code: 511002921


Here the code of the script. What you see. It is almost identical::

function c511002921.initial_effect(c)
	--Activate
	local e1=Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_DRAW)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetHintTiming(0,TIMING_BATTLE_START+TIMING_DAMAGE_STEP)
	e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
	e1:SetCondition(c511002921.condition)
	e1:SetTarget(c511002921.target)
	e1:SetOperation(c511002921.activate)
	c:RegisterEffect(e1)
end
function c511002921.condition(e,tp,eg,ep,ev,re,r,rp)
	local ph=Duel.GetCurrentPhase()
	return ph>=0x08 and ph<=0x20 and Duel.GetTurnPlayer()~=tp
end
function c511002921.target(e,tp,eg,ep,ev,re,r,rp,chk)
	if chk==0 then return true end
	Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end
function c511002921.activate(e,tp,eg,ep,ev,re,r,rp)
	Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
	Duel.BreakEffect()
	Duel.Draw(1-tp,1,REASON_EFFECT)
	local e1=Effect.CreateEffect(e:GetHandler())
	e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
	e1:SetCode(EVENT_PHASE+PHASE_END)
	e1:SetReset(RESET_PHASE+PHASE_END)
	e1:SetCountLimit(1)
	e1:SetOperation(c511002921.lpop)
	Duel.RegisterEffect(e1,tp)
end
function c511002921.lpop(e,tp,eg,ep,ev,re,r,rp)
	Duel.Hint(HINT_CARD,0,511002921)
	Duel.SetLP(tp,0)
end
Valossa
  • Valossa
  • Advanced Member Topic Starter
2016-09-16T13:04:05Z
oh yes, but my code make my LP 0 first and my opp dont buy a card, ahsahshah almost i got it ahshahsah
Michael Lawrence Dee
2016-09-16T13:38:16Z
Originally Posted by: Valossa 

oh yes, but my code make my LP 0 first and my opp dont buy a card, ahsahshah almost i got it ahshahsah



You should say "Devoted Love modified". Tons of people will misinterpret you and mostly likely won't read about your Customization since they already read about the card.
Now this is how I play: