BlaceChaos
Member Title : Blace Posts : 3 Join date : 2014-06-18 Age : 30
| Subject: Having difficult with codes Wed Jun 18, 2014 9:10 pm | |
| I've been trying to fix one of my custom cards' codes, but they won't do anything. The card: http://prntscr.com/3u43fn- Code:
-- Uranel, Angel of Void function c10.initial_effect(c) --xyz summon aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsSetCard,0x2b8),4),2,nil,nil,5) c:EnableReviveLimit() --atkdown local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_REPEAT) e1:SetTarget(c10.atktg) e1:SetValue(c10.atkval) c:RegisterEffect(e1) --protection local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetRange(LOCATION_MZONE,0) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCode(EVENT_FREE_CHAIN) e1:SetHintTiming(0,0x1e0) e2:SetCost(c10.cost) e2:SetOperation(c10.op) c:RegisterEffect(e2) end
function c10.atktg(e,c) return not c:IsSetCard(0x2b8) end function c10.atkval(e,c) return Duel.GetOverlayCount(e:GetHandler(),1,0)*-100 end function c10.cfilter(c,tp) return c:IsSetCard(0x2b8) end
function c10.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) end function c10.op(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT+EFFECT_INDESTRUCTABLE_BATTLE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x2b8)) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetValue(1) Duel.RegisterEffect(e1,tp) end
Most of the time, the ATK decrease would glitch out. And also sometimes when I activate his effect, either all still dies, or just he dies. |
|
AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: Having difficult with codes Wed Jun 18, 2014 10:35 pm | |
| in your 2nd effect (after 'local e2=...') there is one 'e1' instead of 'e2' ^^ --> in SetHintTiming |
|
BlaceChaos
Member Title : Blace Posts : 3 Join date : 2014-06-18 Age : 30
| Subject: Re: Having difficult with codes Thu Jun 19, 2014 1:21 am | |
| Oh thanks.
Although they still die.. |
|
TGAP-Trixie
Member Title : Trixie does not even... Posts : 273 Join date : 2014-04-17
| Subject: Re: Having difficult with codes Thu Jun 19, 2014 2:48 am | |
| IDK if set count limit needs that code single thing at the end if the effect is a quick effect.
I don't think that'll help with the destruction glitch :S.
Also when they get destroyed, is it different when you activate it during the opps turn and your turn? Like during your turn, do they all get destroyed or just Uranel? |
|
BlaceChaos
Member Title : Blace Posts : 3 Join date : 2014-06-18 Age : 30
| Subject: Re: Having difficult with codes Thu Jun 19, 2014 7:59 am | |
| Regardless whose turn it was, they all still dies.
But I have figured it out. xD |
|
AoO
Member Title : Noob4ever Posts : 241 Join date : 2014-04-25 Location : I only know that it is dark :/
| Subject: Re: Having difficult with codes Thu Jun 19, 2014 9:25 am | |
| What was the mistake you figured it out?? |
|
Sponsored content
| Subject: Re: Having difficult with codes | |
| |
|