Commit 68d85fab authored by TanakaKotoha's avatar TanakaKotoha

jbdxbl

parent 1ac1f1b0
......@@ -66,15 +66,14 @@ function c112014.thfilter4(c,e,tp)
return c:IsSetCard(0xca9) and c:IsLinkAbove(2)
end
function c112014.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c112014.thfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c112014.thfilter4,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c112014.thfilter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c112014.thfilter3,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) and Duel.IsExistingMatchingCard(c112014.thfilter4,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c112014.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 and not Duel.IsExistingMatchingCard(c112014.thfilter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c112014.thfilter3,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function c112014.twocon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,112021)
......
......@@ -58,7 +58,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
......
......@@ -172,7 +172,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
op=1
end
if c:IsRelateToEffect(e) and op==0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
if op==1 then
local g1=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1)
......
......@@ -135,7 +135,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) then b1=1 end
if Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,0x1015,1) then b2=1 end
if b1==1 and b2==1 then
if b1==1 and b2==1 then
op=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
elseif b1==1 then
op=0
......@@ -143,7 +143,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
op=1
end
if c:IsRelateToEffect(e) and op==0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
if op==1 then
local g1=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1)
......
......@@ -145,7 +145,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
op=1
end
if c:IsRelateToEffect(e) and op==0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
if op==1 then
local g1=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1)
......
......@@ -173,7 +173,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
op=1
end
if c:IsRelateToEffect(e) and op==0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
if op==1 then
local g1=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1)
......
......@@ -138,7 +138,7 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
op=1
end
if c:IsRelateToEffect(e) and op==0 then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
if op==1 then
local g1=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x1015,1)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion materia
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,cm.fusfilter1,cm.fusfilter2,cm.fusfilter3,cm.fusfilter4,cm.fusfilter5,cm.fusfilter6,cm.fusfilter7)
aux.AddFusionProcMix(c,false,true,cm.fusfilter3,cm.fusfilter4,cm.fusfilter5,cm.fusfilter6,cm.fusfilter7)
--pendulum summon
aux.EnablePendulumAttribute(c,false)
--spsummon condition
......@@ -14,66 +14,7 @@ function cm.initial_effect(c)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--immune effect
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(cm.etarget)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--indes
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e12:SetRange(LOCATION_PZONE)
e12:SetTargetRange(LOCATION_ONFIELD,0)
e12:SetTarget(cm.etarget)
e12:SetValue(cm.indct12)
c:RegisterEffect(e12)
--add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(cm.condition)
e2:SetOperation(cm.counter)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(2,m)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(cm.cost)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCountLimit(2,m)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.negcon)
e4:SetTarget(cm.negtg)
e4:SetOperation(cm.negop)
c:RegisterEffect(e4)
--set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(cm.setcon)
e5:SetTarget(cm.settg)
e5:SetOperation(cm.setop)
c:RegisterEffect(e5)
--Equip Okatana
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -82,12 +23,6 @@ function cm.initial_effect(c)
e6:SetOperation(cm.Eqop1)
c:RegisterEffect(e6)
end
function cm.fusfilter1(c)
return c:IsType(TYPE_PENDULUM)
end
function cm.fusfilter2(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.fusfilter3(c)
return c:IsSetCard(0x341) and c:IsType(TYPE_RITUAL)
end
......@@ -215,7 +150,7 @@ end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if Duel.Destroy(g,REASON_EFFECT)~=0 and e:GetHandler():IsRelateToEffect(e) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment