a place for all your custom card needs you can post scripts pics and request for card to be made also please donate to the funding for a new server made for custom card duels
 
HomePortalCalendarFAQSearchMemberlistUsergroupsRegisterLog in

Share | .
 

 how hard is this card to make?

View previous topic View next topic Go down 
AuthorMessage
Silencer




Member Title : Silencer
Posts : 16
Join date : 2014-03-01

PostSubject: how hard is this card to make?   Sat Jul 26, 2014 8:07 pm

how hard is the following card to script?

http://yugioh.wikia.com/wiki/Mirage_Spell
Back to top Go down
View user profile
Silencer




Member Title : Silencer
Posts : 16
Join date : 2014-03-01

PostSubject: Re: how hard is this card to make?   Wed Aug 06, 2014 4:13 pm

no takers?

really only need this card or some version of this card to complete my Little Yugi Character Deck
Back to top Go down
View user profile
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how hard is this card to make?   Thu Aug 07, 2014 4:54 pm

I tried to make a script, but it doesn't make it easier, that it first, goes for ATK and DEF, and second, even prevent that change XD
Here I have a draft (sorry it is not tested, so I don't know, whether this is working or not -__-')

--Mirage Spell
function cXXXX.initial_effect(c)
    --Get LP instead of ATK/DEF Change
    local e1=Effect.CreateEffect(c)
    e1:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
    e1:SetType(EFFECT_TYPE_TRIGGER_0)
    e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e1:SetTarget(cXXXX.tg)
    e1:SetOperation(cXXXX.op)
    c:RegisterEffect(c)
end

function cXXXX.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() or c:GetDefence()~=GetBaseDefence()
end
function cXXXX.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsLocation(LOCATION_MZONE,0) and chkc:IsControler(tp) and cXXXX.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cXXXX.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cXXXX.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local atk=tc:GetAttack()
local batk=tc:GetBaseAttack()
local def=tc:GetDefence()
local bdef=tc:GetBaseDefence()
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,(batk-atk) and (bdef-def) or (atk-batk) and (def-bdef))
end
function cXXXX.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
local batk=tc:GetBaseAttack()
local def=tc:GetDefence()
local bdef=tc:GetBaseDefence()
if batk~=atk or bdef~=def then
local dif1=(batk>atk) and (batk-atk) or (atk-batk)
local dif2=(bdef>def) and (bdef-def) or (def-bdef)
local dif=dif1+dif2
local rec=Duel.Recover(tp,dif,REASON_EFFECT)
if rec>0 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK+EFFECT_UPDATE_DEFENCE)
e1:SetTarget(cXXXX.tg)
e1:SetValue(dif)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
end
end

Replace cXXXX with the ID of your card.
I hope that this script work ^^'

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
Silencer




Member Title : Silencer
Posts : 16
Join date : 2014-03-01

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 12:32 am

AoO wrote:
I tried to make a script, but it doesn't make it easier, that it first, goes for ATK and DEF, and second, even prevent that change XD
Here I have a draft (sorry it is not tested, so I don't know, whether this is working or not -__-')

--Mirage Spell
function cXXXX.initial_effect(c)
    --Get LP instead of ATK/DEF Change
    local e1=Effect.CreateEffect(c)
    e1:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
    e1:SetType(EFFECT_TYPE_TRIGGER_0)
    e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e1:SetTarget(cXXXX.tg)
    e1:SetOperation(cXXXX.op)
    c:RegisterEffect(c)
end

function cXXXX.filter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() or c:GetDefence()~=GetBaseDefence()
end
function cXXXX.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsLocation(LOCATION_MZONE,0) and chkc:IsControler(tp) and cXXXX.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cXXXX.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cXXXX.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local atk=tc:GetAttack()
local batk=tc:GetBaseAttack()
local def=tc:GetDefence()
local bdef=tc:GetBaseDefence()
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,(batk-atk) and (bdef-def) or (atk-batk) and (def-bdef))
end
function cXXXX.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
local batk=tc:GetBaseAttack()
local def=tc:GetDefence()
local bdef=tc:GetBaseDefence()
if batk~=atk or bdef~=def then
local dif1=(batk>atk) and (batk-atk) or (atk-batk)
local dif2=(bdef>def) and (bdef-def) or (def-bdef)
local dif=dif1+dif2
local rec=Duel.Recover(tp,dif,REASON_EFFECT)
if rec>0 and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK+EFFECT_UPDATE_DEFENCE)
e1:SetTarget(cXXXX.tg)
e1:SetValue(dif)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
end
end

Replace cXXXX with the ID of your card.
I hope that this script work ^^'

got this Error: http://illiweb.com/fa/pbucket.gif
Back to top Go down
View user profile
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 12:57 am

Ah found the mistake. There we go:

Code:
--Mirage Spell
function cXXXX.initial_effect(c)
    --Get LP instead of ATK/DEF Change
    local e1=Effect.CreateEffect(c)
    e1:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
    e1:SetType(EFFECT_TYPE_TRIGGER_0)
    e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e1:SetTarget(cXXXX.tg)
    e1:SetOperation(cXXXX.op)
    c:RegisterEffect(e1)
end

function cXXXX.filter(c)
 return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() or c:GetDefence()~=GetBaseDefence()
end
function cXXXX.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsLocation(LOCATION_MZONE,0) and chkc:IsControler(tp) and cXXXX.filter(chkc) end
 if chk==0 then return Duel.IsExistingTarget(cXXXX.filter,tp,LOCATION_MZONE,0,1,nil) end
 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
 local g=Duel.SelectTarget(tp,cXXXX.filter,tp,LOCATION_MZONE,0,1,1,nil)
 local tc=g:GetFirst()
 local atk=tc:GetAttack()
 local batk=tc:GetBaseAttack()
 local def=tc:GetDefence()
 local bdef=tc:GetBaseDefence()
 Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,(batk-atk) and (bdef-def) or (atk-batk) and (def-bdef))
end
function cXXXX.op(e,tp,eg,ep,ev,re,r,rp)
 local c=e:GetHandler()
 local tc=Duel.GetFirstTarget()
 if tc:IsRelateToEffect(e) and tc:IsFaceup() then
 local atk=tc:GetAttack()
 local batk=tc:GetBaseAttack()
 local def=tc:GetDefence()
 local bdef=tc:GetBaseDefence()
 if batk~=atk or bdef~=def then
 local dif1=(batk>atk) and (batk-atk) or (atk-batk)
 local dif2=(bdef>def) and (bdef-def) or (def-bdef)
 local dif=dif1+dif2
 local rec=Duel.Recover(tp,dif,REASON_EFFECT)
 if rec>0 and c:IsRelateToEffect(e) and c:IsFaceup() then
 local e1=Effect.CreateEffect(c)
 e1:SetType(EFFECT_TYPE_SINGLE)
 e1:SetCode(EFFECT_UPDATE_ATTACK+EFFECT_UPDATE_DEFENCE)
 e1:SetTarget(cXXXX.tg)
 e1:SetValue(dif)
 e1:SetReset(RESET_EVENT+0x1ff0000)
 c:RegisterEffect(e1)
 end
 end
 end
end

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
Silencer




Member Title : Silencer
Posts : 16
Join date : 2014-03-01

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 2:45 am

AoO wrote:
Ah found the mistake. There we go:

Code:
--Mirage Spell
function cXXXX.initial_effect(c)
    --Get LP instead of ATK/DEF Change
    local e1=Effect.CreateEffect(c)
    e1:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
    e1:SetType(EFFECT_TYPE_TRIGGER_0)
    e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e1:SetTarget(cXXXX.tg)
    e1:SetOperation(cXXXX.op)
    c:RegisterEffect(e1)
end

function cXXXX.filter(c)
 return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() or c:GetDefence()~=GetBaseDefence()
end
function cXXXX.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsLocation(LOCATION_MZONE,0) and chkc:IsControler(tp) and cXXXX.filter(chkc) end
 if chk==0 then return Duel.IsExistingTarget(cXXXX.filter,tp,LOCATION_MZONE,0,1,nil) end
 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
 local g=Duel.SelectTarget(tp,cXXXX.filter,tp,LOCATION_MZONE,0,1,1,nil)
 local tc=g:GetFirst()
 local atk=tc:GetAttack()
 local batk=tc:GetBaseAttack()
 local def=tc:GetDefence()
 local bdef=tc:GetBaseDefence()
 Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,(batk-atk) and (bdef-def) or (atk-batk) and (def-bdef))
end
function cXXXX.op(e,tp,eg,ep,ev,re,r,rp)
 local c=e:GetHandler()
 local tc=Duel.GetFirstTarget()
 if tc:IsRelateToEffect(e) and tc:IsFaceup() then
 local atk=tc:GetAttack()
 local batk=tc:GetBaseAttack()
 local def=tc:GetDefence()
 local bdef=tc:GetBaseDefence()
 if batk~=atk or bdef~=def then
 local dif1=(batk>atk) and (batk-atk) or (atk-batk)
 local dif2=(bdef>def) and (bdef-def) or (def-bdef)
 local dif=dif1+dif2
 local rec=Duel.Recover(tp,dif,REASON_EFFECT)
 if rec>0 and c:IsRelateToEffect(e) and c:IsFaceup() then
 local e1=Effect.CreateEffect(c)
 e1:SetType(EFFECT_TYPE_SINGLE)
 e1:SetCode(EFFECT_UPDATE_ATTACK+EFFECT_UPDATE_DEFENCE)
 e1:SetTarget(cXXXX.tg)
 e1:SetValue(dif)
 e1:SetReset(RESET_EVENT+0x1ff0000)
 c:RegisterEffect(e1)
 end
 end
 end
end
ok I get no errors...but I don't know wat this card is suppose to respond to??...tried using it against Spellbinding Circle (Anime) didnt get an Activate prompt
Back to top Go down
View user profile
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 1:33 pm

Well, I tested the card by myself, changed a little bit and I noticed, that the card can only be activated after the atk and/or def was/were changed and you activated another card (as far as I can see).
The Problem is, that the change of atk/def is not an EVENT Code itselt (in comparison the activation of this card would be an EVENT, that you can negate) where you can chain an effect, because this card doesn't know, that the following effect would change the atk/ or def of your monster.
To keep a long story short, your card can first so sth. if the atk/ def are already changed.
Then I'm sorry to say, but because I'm to stupid to make the atk/ def of the target card back to normal, you only get lifepoints.

Here is the changed code (Sorry, that I couldn't make it better -___-'):
Code:
--Mirage Spell
function c900000029.initial_effect(c)
    --Get LP instead of ATK/DEF Change
    local e1=Effect.CreateEffect(c)
    e1:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)--+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE  (CATEGORY_RECOVER
    e1:SetType(EFFECT_TYPE_ACTIVATE)
    e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e1:SetCode(EVENT_FREE_CHAIN)
    e1:SetTarget(c900000029.tg)
    e1:SetOperation(c900000029.op)
    c:RegisterEffect(e1)
end

function c900000029.filter(c)
   return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack() or c:GetDefence()~=c:GetBaseDefence()
end
function c900000029.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsLocation(LOCATION_MZONE,0) and chkc:IsControler(tp) and c900000029.filter(chkc) end
   if chk==0 then return Duel.IsExistingTarget(c900000029.filter,tp,LOCATION_MZONE,0,1,nil) end
   Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
   local g=Duel.SelectTarget(tp,c900000029.filter,tp,LOCATION_MZONE,0,1,1,nil)
   local tc=g:GetFirst()
   local atk=tc:GetAttack()
   local batk=tc:GetBaseAttack()
   local def=tc:GetDefence()
   local bdef=tc:GetBaseDefence()
   Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,(batk-atk) and (bdef-def) or (atk-batk) and (def-bdef))   
end
function c900000029.op(e,tp,eg,ep,ev,re,r,rp)
   local c=e:GetHandler()
   local tc=Duel.GetFirstTarget()
   if tc:IsRelateToEffect(e) and tc:IsFaceup() then
      local atk=tc:GetAttack()
      local batk=tc:GetBaseAttack()
      local def=tc:GetDefence()
      local bdef=tc:GetBaseDefence()
      if batk~=atk or bdef~=def then
         local dif1=(batk>atk) and (batk-atk) or (atk-batk)
         local dif2=(bdef>def) and (bdef-def) or (def-bdef)
         local dif=dif1+dif2
         local rec=Duel.Recover(tp,dif,REASON_EFFECT)
         if rec>0 and tc:IsRelateToEffect(e) and tc:IsFaceup() then
            local e1=Effect.CreateEffect(c)
            e1:SetType(EFFECT_TYPE_SINGLE)
            e1:SetCode(EFFECT_UPDATE_ATTACK+EFFECT_UPDATE_DEFENCE)
            e1:SetReset(RESET_EVENT+0x1ff0000)
            e1:SetValue(dif)
            tc:RegisterEffect(e1)
         end
      
      end
   end
end

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
Silencer




Member Title : Silencer
Posts : 16
Join date : 2014-03-01

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 3:06 pm

well the card works like you said.

although I think its suppose to be quickplay
Back to top Go down
View user profile
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 4:35 pm

Mirage Spell is a quick spell card, which is why you can also activate it in your opponents turn Wink
Or do you mean sth. else??

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
Silencer




Member Title : Silencer
Posts : 16
Join date : 2014-03-01

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 7:21 pm

AoO wrote:
Mirage Spell is a quick spell card, which is why you can also activate it in your opponents turn Wink
Or do you mean sth. else??

nvm...found out wat I was doing wrong...thx.
Back to top Go down
View user profile
AoO

avatar


Member Title : Noob4ever
Posts : 241
Join date : 2014-04-25
Location : I only know that it is dark :/

PostSubject: Re: how hard is this card to make?   Fri Aug 08, 2014 10:27 pm

np

_________________

Keep going, keep experiencing, keep learning AND: NEVER STOP!! >.<

Yugioh Custom Cards/ Decks/ Duels: https://www.youtube.com/channel/UCPil2ljKCm4HBhNT7wcNl-Q
Back to top Go down
View user profile
Sponsored content





PostSubject: Re: how hard is this card to make?   

Back to top Go down
 

how hard is this card to make?

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» theatre fold card
» Should we make a tier list on which girl has the biggest Rack?
» New Payment Method - Credit/Debit Card
» HOW TO MAKE BOOKMARKS FROM METAL
» [Card Review Article] Card Sneak-a-Peek: Herald of Perfection

Permissions in this forum:You cannot reply to topics in this forum
Mackpro :: MackPro :: Requests-