Added pendulum place effect to Union and Synchron Dragon

This commit is contained in:
2021-12-22 22:43:36 +01:00
parent 0779f52c9d
commit 4e068c5252
8 changed files with 56 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 KiB

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@ local s,id=GetID()
function s.initial_effect(c)
--pendulum summon
Pendulum.AddProcedure(c)
--fusion effect | from trump witch
--fusion effect
local params = {nil,Fusion.OnFieldMat}
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)

View File

@@ -18,6 +18,15 @@ function s.initial_effect(c)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--place in pendulum zone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(s.pencon)
e2:SetTarget(s.pentg)
e2:SetOperation(s.penop)
c:RegisterEffect(e2)
end
--damage effect
function s.thfilter(c)
@@ -38,4 +47,20 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToEffect(e) and Duel.Damage(p,tc:GetAttack(),REASON_EFFECT) then
Duel.Destroy(tc, REASON_DESTROY)
end
end
-- place in pendulum zone functions
--s.pendulum_level = 4
function s.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function s.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end

View File

@@ -6,7 +6,7 @@ function s.initial_effect(c)
--xyz summon
Xyz.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x25E),4,2)
c:EnableReviveLimit()
--halve and gain | from dark anthelion
--halve and gain
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_IGNITION)

View File

@@ -5,5 +5,32 @@ function s.initial_effect(c)
Pendulum.AddProcedure(c,false)
--synchro summon
Synchro.AddProcedure(c,aux.FilterBoolFunctionEx(Card.IsSetCard,0x25E),1,1,Synchro.NonTuner(Card.IsSetCard,0x25E),1,99)
c:EnableReviveLimit()
c:EnableReviveLimit()
--monster effect
--place in pendulum zone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(s.pencon)
e2:SetTarget(s.pentg)
e2:SetOperation(s.penop)
c:RegisterEffect(e2)
end
-- place in pendulum zone functions
--s.pendulum_level = 4
function s.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function s.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function s.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

BIN
template pics/test.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 KiB