Commit de7b5d8f authored by TanakaKotoha's avatar TanakaKotoha

iNode

parent 245ce8f6
......@@ -15,13 +15,13 @@ function c12001004.initial_effect(c)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12001004,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,12001104)
e3:SetCondition(c12001004.dscon)
e3:SetSetTarget(c12001004.dstg)
e3:SetTarget(c12001004.dstg)
e3:SetOperation(c12001004.dsop)
c:RegisterEffect(e3)
end
......@@ -50,15 +50,12 @@ function c12001004.dscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001004.dstg(e,tp,eg,ep,ev,re,r,rp)
function c12001004.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function c12001004.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_RULE)
end
end
......@@ -15,11 +15,11 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(12001017,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,12001104)
e3:SetCondition(c12001017.dscon)
e3:SetSetTarget(c12001017.dstg)
e3:SetTarget(c12001017.dstg)
e3:SetOperation(c12001017.dsop)
c:RegisterEffect(e3)
......@@ -47,16 +47,14 @@ function c12001017.dscon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_DECK) and c:IsReason(REASON_REVEAL)
end
function c12001017.dstg(e,tp,eg,ep,ev,re,r,rp)
function c12001017.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c12001017.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc:IsRelateToEffect(e) then
-- if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_RULE)
end
-- end
end
......@@ -20,11 +20,11 @@ function c12001018.initial_effect(c)
e2:SetDescription(aux.Stringid(12001018,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,12001104)
e2:SetCondition(c12001018.con2)
e2:SetTarget(c12001018.dstg)
e2:SetCondition(c12001018.dstg)
e2:SetOperation(c12001018.dsop)
c:RegisterEffect(e2)
--
......@@ -128,16 +128,12 @@ end
function c12001018.tfilter2(c)
return c:IsAbleToRemove()
end
function c12001018.dstg(e,tp,eg,ep,ev,re,r,rp)
function c12001018.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c12001018.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_RULE)
end
end
......@@ -69,11 +69,9 @@ function cm.rccfilter(c)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.IsExistingMatchingCard(cm.rccfilter,tp,LOCATION_MZONE,0,1,c) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(17060826,2)) then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(cm.rccfilter,tp,LOCATION_MZONE,0,1,c) and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(17060826,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,1,1,nil)
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCountLimit(1,17060915)
e2:SetCondition(cm.hspcon)
e2:SetOperation(cm.hspop)
c:RegisterEffect(e2)
......@@ -79,7 +79,7 @@ function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_GRAVE)
return ft>-1 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,ft)
return ft>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,ft)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_GRAVE)
......
......@@ -8,7 +8,7 @@ function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetDescription(aux.Stringid(m,0))
e0:SetDescription(aux.Stringid(17060933,0))
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetTarget(cm.sptg)
......@@ -16,7 +16,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetDescription(aux.Stringid(17060933,1))
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -27,12 +27,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetDescription(aux.Stringid(17060933,2))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,m)
e2:SetCountLimit(1,17060933)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
......@@ -68,6 +68,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler()
if not tc:IsRelateToEffect(e) then return end
local mg=Duel.GetRitualMaterial(tp):Filter(cm.matfilter,c,c)
local ft=Duel.GetMZoneCount(tp)
if tc then
......
......@@ -38,6 +38,7 @@ function Amana.Momoka(c)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,m+900)
e0:SetValue(Amana.matval)
c:RegisterEffect(e0)
end
......@@ -50,3 +51,28 @@ end
function Amana.matval(e,c,mg)
return c:IsSetCard(0x3603) and mg:IsExists(Amana.mfilter,1,nil) and not mg:IsExists(Amana.exmfilter,1,nil)
end
--majsoulGirl/Boy
function Amana.MajsoulGirl(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(Amana.namecon)
e0:SetValue(26818000)
c:RegisterEffect(e0)
end
function Amana.MajsoulBoy(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetRange(LOCATION_MZONE)
e0:SetCondition(Amana.namecon)
e0:SetValue(26818001)
c:RegisterEffect(e0)
end
function Amana.namecon(e)
local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_END
end
......@@ -32,7 +32,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if not tc:IsCode(26818000,26818001) then
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local ph=Duel.GetCurrentPhase()
if ph==PHASE_MAIN1 then
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -41,5 +43,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
if ph==PHASE_MAIN2 then
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end
end
end
end
......@@ -2,7 +2,7 @@
function c33400116.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -117,9 +117,7 @@ function c65020008.pop(e,tp,eg,ep,ev,re,r,rp)
local scl1=tc1:GetLeftScale()
local scl2=tc2:GetRightScale()
if scl1>scl2 then scl1,scl2=scl2,scl1 end
local num=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local num2=Duel.GetMatchingGroupCount(c65020008.pfilter,tp,LOCATION_EXTRA,0,nil,e,tp,scl1,scl2)
if num>num2 then num=num2 end
local num=Duel.GetMatchingGroupCount(c65020008.pfilter,tp,LOCATION_EXTRA,0,nil,e,tp,scl1,scl2)
local g=Duel.SelectMatchingCard(tp,c65020008.pfilter,tp,LOCATION_EXTRA,0,num,num,nil,e,tp,scl1,scl2)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
......
......@@ -32,7 +32,7 @@ function cm.spfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and c:IsSetCard(0x374) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil) and not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil)
......
......@@ -36,7 +36,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.filter(c)
return (c:IsSetCard(0x374) and c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS)) or c:IsCode(66915001) and c:IsAbleToHand()
return (c:IsSetCard(0x374) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) or c:IsType(TYPE_TRAP)) or c:IsCode(66915001) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerCanDiscardDeck(tp,5) then
......
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